Object oriented

public

Start the public section of a file — what other files are allowed to see.

Syntax

public:
    define func Add(num left, num right);
        ...
    end;

How she behaves

  • Functions (and fields) under public: can be used after import.
  • Inside a class, public methods and the constructor are what callers may use.
  • Think of it as the front door.

Example

public:
    define func Add(num left, num right);
        return left + right;
    end;

See also