?login_element?

Subversion Repositories NedoOS

Rev

Rev 129 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1.     ;; invalid numeric literals errors
  2.  
  3.     ;; missing digits
  4.     DD      #
  5.     ;DD $   => is actual valid syntax for current address pointer
  6.     DD      0x
  7.     DD      %
  8.  
  9.     ;; hard 32b overflow
  10.     DD      0xFFFFFFFF                          ; OK
  11.     DD      0x100000000                         ; overflow error
  12.     DD      %11111111111111111111111111111111   ; OK
  13.     DD      %100000000000000000000000000000000  ; overflow error
  14.     DD      37777777777o                        ; OK
  15.     DD      40000000000o                        ; overflow error
  16.     DD      4294967295                          ; OK
  17.     DD      4294967296                          ; overflow error
  18.  
  19.     ;; digit out of base
  20.     DD      12A0
  21.     DD      12A0d
  22.     DD      0FFGFh
  23.     DD      0xFFGF
  24.     DD      $FFGF
  25.     DD      #FFGF
  26.     DD      1002001b
  27.     DD      01002001b
  28.     DD      %1002001
  29.     DD      %01002001
  30.     DD      12834q
  31.     DD      12834o
  32.  
  33.     ;; since v1.20.0 the parser does recognise decimal part of the constant and throws it away with warning
  34.     ;; this is crude work-around to help migrate Lua 5.1 scripts, as those now format values like 2^7 as "128.0"
  35.     OPT -Wdecimalz
  36.     DB      12.0
  37.     DB      $AB.0
  38.     DB      %101.0
  39.     DB      0q77.0
  40.     DB      12.03
  41.     DB      $AB.0E
  42.     DB      %101.01
  43.     DB      0q77.01
  44.     LUA ALLPASS     ; warning vs integer variant
  45.         _pc("db " .. 2^7 .. " , " .. (1<<7))    -- "1<<7" is integer variant of "2^7"
  46.         _pc("db " .. 2^7.00001 .. " , " .. math.floor(2^7.00001))
  47.         _pc("db " .. 35/7 .. " , " .. 35//7)    -- "35//7" is integer variant of "35/7"
  48.         _pc("db " .. 36/7 .. " , " .. 36//7)    -- "36//7" is integer variant of "36/7"
  49.     ENDLUA
  50.     DB      12.0'0
  51.    DB      12.0'1
  52.     ; errors when decimal part has invalid digit
  53.     DB      12.A
  54.     DB      $AB.G
  55.     DB      %101.2
  56.     DB      0q77.8
  57.