Difference between revisions of "DEFINE"

From QB64 Wiki
Jump to navigation Jump to search
Line 12: Line 12:
  
  
''Example:'' _DEFINE A-C, F [[AS]] [[UNSIGNED]] [[INTEGER]]
+
''Example:'' _DEFINE A-C, F [[AS]] [[_UNSIGNED]] [[INTEGER]]
  
  

Revision as of 00:40, 2 October 2009

_DEFINE lets you define a range of variables according to their first character as a datatype.


Syntax: _DEFINE range or letter[, range2 or letter2[, range3 or letter3[, ...]]] AS datatype




Example: _DEFINE A-C, F AS _UNSIGNED INTEGER


Explanation: 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: DIM, DEFSTR, DEFLNG, DEFINT, DEFSNG, DEFDBL, _UNSIGNED, ABS, SGN

Referance: Mathematical Operations



Navigation:

Go to Keyword Reference - Alphabetical

Go to Keyword Reference - By usage