Type declaration for functions, parameters, etc

In declarations, must be specified types of function parameters, type members, etc. Usually, type name is placed before parameter/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 VARIANT
Character ! @ #
or none
% ^ $ ~ `
(QM 2.3.3)

 

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

 

a

 

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

 

function'int
function#

 

For functions that don't return a value, don't specify a type.

 

Examples (full declarations)

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

 Type of function is word pointer; types of parameters  -  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]