Type declaration for functions, arguments, members, etc

In declarations, must be specified types of function arguments, type members, etc. Usually, type name is placed before argument/member name, without spaces between them. To separate them, use '. Example:

 

str'a

 

If it is pointer or reference, ' is not used. Examples:

 

str*a
str&a
str**a
str***a
str*&a

 

If it is ARRAY, ' is optional. Examples:

 

ARRAY(str)a
ARRAY(str)'a

 

For some types, also can be used type declaration character instead of type name. Examples:

 

#a
~a

 

Type declaration characters:

Type byte word int long double lpstr str
Character ! @ # or none % ^ $ ~

 

If type is int, type name can be omitted. Example:

 

a

 

The type of an user-defined function must follow the function keyword. Use ' to separate function and type name, unless you use a type declaration character. Examples:

 

function'int
function#

 

To declare a function (user-defined, dll, etc) that does not return a value (void in C; Sub in Visual Basic), do not specify a type.

 

Examples (full declarations)

 Type of function SetCursorPos is int; types of arguments  -  int:
dll user32 #SetCursorPos x y

 Type of function is word pointer; types of arguments  -  int, lpstr, str reference, POINT pointer:
function'word* int'i lpstr'a str&sr POINT*pp
 or
function@* i $a ~&sr POINT*pp

 Type of rcPaint is RECT; type of r is byte array; type of other members is int:
type PAINTSTRUCT hdc fErase RECT'rcPaint fRestore fIncUpd !r[32]