I found three types of limits about numeric literals in Small Basic. Following explanation is about positive numbers, but negative numbers have the similar limits.
Numeric literal larger than 1015 will be rounded at substitution. In following code, the second one is rounded. But the third one (text) is not rounded.
1000000000000000 1000000000000000 1000000000000001
In following code, the first substitution succeeds. But the second one fails with a run time error "Value was either too large or too small for a Decimal."
79228162514264300000000000000 Unhandled Exception: System.OverflowException: Value was either too large or too small for a Decimal. at System.Decimal..ctor(Double value) at Microsoft.SmallBasic.Library.Primitive.op_Implicit(Double value) at _SmallBasicProgram._Main()
Treated as Text
In following code, the first text is not treated as a number. The second one is treated as a number, so causes run time error when increased.
79228162514264337593543950336 -1 792281625142643375935439503361 79228162514264337593543950335 79228162514264337593543950334 Unhandled Exception: System.OverflowException: Value was either too large or too small for a Decimal. at System.Decimal.FCallAddSub(Decimal& d1, Decimal& d2, Byte bSign) at Microsoft.SmallBasic.Library.Primitive.Add(Primitive addend) at _SmallBasicProgram._Main()