Changes between Version 1 and Version 2 of Literals
- Timestamp:
- 11/15/09 00:29:36 (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Literals
v1 v2 54 54 == Numeric Literals == 55 55 56 Non explicitly typed numeric Literals are typed to Decimal by default.[[BR]]56 Non explicitly typed numeric literals are typed to Decimal by default.[[BR]] 57 57 This can be overidden by the compiler '''-number''' commandline switch or '''@number''' compiler directive. 58 58 59 Explicitly typed numeric literals can be specified by suffixing the numeric literal with a signand size specification ( with an optional leading '_').59 Explicitly typed numeric literals can be specified by suffixing the numeric literal with a type and size specification ( with an optional leading '_'). 60 60 61 61 62 Signs are 63 u - unsigned. 64 i - signed 62 Types are 63 - u - unsigned int 64 - i - signed int 65 - d - decimal 66 - f - float 67 65 68 66 69 Sizes are 67 8 68 16 69 32 70 64 71 70 - for int 71 8, 16, 32, 64 72 - for float 73 32, 64 72 74 as in 73 75 74 76 {{{ 75 i = 123 # default (Decimal) 77 d = 123 # default (Decimal) 78 d = 123.4d 76 79 77 80 ii = 123i # integer (default size) 32 bits … … 83 86 84 87 l = 879289992978_i64 # signed 64 bit 88 89 f = 1327.3_f # float (default size 64) 90 f1 = 97.3f32 # or 91 f1 = 97.3_f32 85 92 }}}