Define
DescriptionDefine.<type> [<variable> [= <expression>], <variable> [= <expression>], ...]
If no <variables> are specified, Define is used to change the default type for future untyped variables (including procedure parameters and interface method parameters). The initial default type is long (.l). Each variable can have a default value directly assigned to it.Example:
d = e + f Define.w a = b + cd, e and f will be created as long type variables, since there was no type specified. a, b and c will be signed word typed (.w) as no type is specified and the default type had been changed to the word type.
If variables are specified, Define only declares these variables as "defined type" and will not change the default type.Example:
Define.b a, b = 10, c = b*2, d ; these 4 variables will be byte typed (.b)
DescriptionDefine <variable>.<type> [= <expression>] [, <variable>.<type> [= <expression>], ...]
Alternative possibility for the variable declaration using Define.Example:
Define MyChar.c Define MyLong.l Define MyWord.w Debug SizeOf(MyChar) ; will give 1 byte Debug SizeOf(MyLong) ; will give 4 bytes Debug SizeOf(MyWord) ; will give 2 bytes