Menu

Interfaces

Will Pittenger

Interfaces in ASIL are similar to interfaces in other languages. The syntax is that of a stripped down class. For now, all interface names should be prefixed with a capital I.

interface IMyInterface
    extends ISomeOtherInterface

  function MyFunc var i%
    returns int

class MyClass
    implements IMyInterface

  public override function MyFunc var i%
      returns int
    return 5

Notice the members of the interface have no qualifiers. They are implied to be public abstract. Interfaces can have properties. Such properties should list their get and set options, but those should have no contents.

Because commands and functions in an interface have no implementations, their throws and returns clauses can be moved up one indent level.


Related

Wiki: Functions
Wiki: Home
Wiki: When is it a procedure, command, function, property, property accessor, method, complex statement, or type cast?
Wiki: keywords-class
Wiki: keywords-implements
Wiki: keywords-instructions
Wiki: keywords-throws