Wiki

Changes between Version 1 and Version 2 of Literals

Show
Ignore:
Timestamp:
11/15/09 00:29:36 (14 years ago)
Author:
hopscc
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Literals

    v1 v2  
    5454== Numeric Literals == 
    5555 
    56 Non explicitly typed numeric Literals are typed to Decimal by default.[[BR]] 
     56Non explicitly typed numeric literals are typed to Decimal by default.[[BR]] 
    5757This can be overidden by the compiler '''-number''' commandline switch or '''@number''' compiler  directive. 
    5858 
    59 Explicitly typed numeric literals can be specified by suffixing the numeric literal with a sign and size specification ( with an optional leading '_'). 
     59Explicitly typed numeric literals can be specified by suffixing the numeric literal with a type and size specification ( with an optional leading '_'). 
    6060 
    6161 
    62 Signs are 
    63     u - unsigned. 
    64     i - signed  
     62Types are 
     63    - u - unsigned int 
     64    - i - signed int  
     65    - d - decimal 
     66    - f - float 
     67     
    6568 
    6669Sizes are  
    67     8   
    68     16 
    69     32 
    70     64 
    71  
     70    - for int 
     71      8, 16, 32, 64 
     72    - for float 
     73      32, 64 
    7274as in  
    7375 
    7476{{{ 
    75 i = 123      # default (Decimal) 
     77d = 123      # default (Decimal) 
     78d = 123.4d 
    7679 
    7780ii = 123i    # integer (default size) 32 bits 
     
    8386 
    8487l = 879289992978_i64 # signed 64 bit  
     88 
     89f = 1327.3_f # float (default size 64) 
     90f1 = 97.3f32 # or 
     91f1 = 97.3_f32 
    8592}}}