Difference between revisions of "DEFINE"
Jump to navigation
Jump to search
Navigation:
imported>Clippy m |
imported>Cyperium |
||
Line 2: | Line 2: | ||
− | + | {{PageSyntax}} | |
+ | :<code>{{KW|_DEFINE}} {{Parameter|range or letter}}[, {{Parameter|range2 or letter2}}[, {{Parameter|range3 or letter3}}[, ...]]] {{KW|AS}} [{{KW|_UNSIGNED}}] {{Parameter|datatype}}</code> | ||
+ | {{PageDescription}} | ||
* Variable start letter range is in the form firstletter-endingletter (like A-C) or just a single letter. | * Variable start letter range is in the form firstletter-endingletter (like A-C) or just a single letter. | ||
* Datatypes: [[INTEGER]], [[SINGLE]], [[DOUBLE]], [[LONG]], [[STRING]], [[_BIT]], [[_BYTE]], [[_INTEGER64]], [[_FLOAT]] | * Datatypes: [[INTEGER]], [[SINGLE]], [[DOUBLE]], [[LONG]], [[STRING]], [[_BIT]], [[_BYTE]], [[_INTEGER64]], [[_FLOAT]] | ||
Line 12: | Line 14: | ||
− | + | {{PageExamples}} | |
+ | {{CodeStart}} | ||
− | + | _DEFINE A-C, F AS _UNSIGNED INTEGER | |
+ | |||
+ | {{CodeEnd}} | ||
Line 22: | Line 27: | ||
− | + | {{PageSeeAlso}} | |
− | + | *{{KW|DIM}} | |
− | + | *{{KW|DEFSTR}}, {{KW|DEFLNG}}, {{KW|DEFINT}}, {{KW|DEFSNG}}, {{KW|DEFDBL}} | |
− | + | *{{KW|_UNSIGNED}} | |
− | + | *{{KW|ABS}}, {{KW|SGN}} | |
− | + | ''Reference:'' [[Mathematical Operations]] | |
− | |||
− | + | {{PageNavigation}} |
Revision as of 01:13, 19 January 2010
_DEFINE defines a range of variable names according to their first character as a datatype.
Syntax
Description
- Variable start letter range is in the form firstletter-endingletter (like A-C) or just a single letter.
- Datatypes: INTEGER, SINGLE, DOUBLE, LONG, STRING, _BIT, _BYTE, _INTEGER64, _FLOAT
- Can also use the _UNSIGNED definition for positive numerical values only.
Examples
_DEFINE A-C, F AS _UNSIGNED INTEGER
Explanation: Any undefined variables that start with the letters A, B, C or F will now be defined as unsigned integers. Unsigned integers can only use positive values while ordinary integers can also use negative values.
See also
Reference: Mathematical Operations