Difference between revisions of "DEFINE"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
imported>Cyperium
Line 2: Line 2:
  
  
''Syntax:'' _DEFINE range or letter[, range2 or letter2[, range3 or letter3[, ...]]] [[AS]] [ [[_UNSIGNED]] ] datatype
+
{{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:
  
  
''Example:''
+
{{PageExamples}}
 +
{{CodeStart}}
  
:::_DEFINE A-C, F [[AS]] [[_UNSIGNED]] [[INTEGER]]
+
_DEFINE A-C, F AS _UNSIGNED INTEGER
 +
 
 +
{{CodeEnd}}
  
  
Line 22: Line 27:
  
  
''See also:'' [[DIM]], [[DEFSTR]], [[DEFLNG]], [[DEFINT]], [[DEFSNG]], [[DEFDBL]], [[_UNSIGNED]], [[ABS]], [[SGN]]
+
{{PageSeeAlso}}
 
+
*{{KW|DIM}}
''Referance:'' [[Mathematical Operations]]
+
*{{KW|DEFSTR}}, {{KW|DEFLNG}}, {{KW|DEFINT}}, {{KW|DEFSNG}}, {{KW|DEFDBL}}
 
+
*{{KW|_UNSIGNED}}
 
+
*{{KW|ABS}}, {{KW|SGN}}
  
  
==Navigation:==
+
''Reference:'' [[Mathematical Operations]]
  
[[Keyword_Reference_-_Alphabetical|Go to Keyword Reference - Alphabetical]]
 
  
[[Keyword Reference - By usage|Go to Keyword Reference - By usage]]
+
{{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

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


Description



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



Navigation:
Go to Keyword Reference - Alphabetical
Go to Keyword Reference - By usage
Go to Main WIKI Page