Datatype
In OWBasic the data types integer, float, string, char and boolean are used. The type of variables and functions results from the default type or an attached suffix. For variables the suffix can also be omitted after the first use.
Suffix | Datatype | Variable | Constant | number range |
% | Integer | A% | 3107 | -32768..32767 |
| | | | -2147483648..2147483647 |
# | Float | B# | 3.14159 | |
$ | String | C$ | "Hello" | |
& | Character | C& | 'c' | |
! | Boolean | D! | TRUE,FALSE | TRUE,FALSE |
Integer constants can also be given as hexadecimal value with leading '0x' like 0x7ffe, 0x0D or 0x123A.
In many cases one datatype is converted into other another.
|