You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In RBI it's perfectly valid to use a numeric literal of more than ten characters and still use the # operator to explicitly mark it as a double. In brs, that causes a lexing error:
sub main()
if (3>=9999999999999999999#)
print"oh no"elseprint"phew"endifend sub
hash-in-conditional.brs(2,32-34): Found unexpected conditional-compilation string '#)'
Error occurred during lexing
The text was updated successfully, but these errors were encountered:
sjbarag
added
bug
Any difference between this BrightScript implementation and RBI, or otherwise unexpected behavior
lexer
Affects this project's lexer (aka scanner)
labels
Jan 22, 2021
RBI forces all literal numbers to double-precision if they're longer
than characters, and also allows such a number to be explicitly
designated a double with a trailing `#`. `brs` didn't. Look for a
trailing `#` when lexing long numeric literals, to avoid treating it
like a conditional compilation string.
fixes#616
#617)
RBI forces all literal numbers to double-precision if they're longer
than characters, and also allows such a number to be explicitly
designated a double with a trailing `#`. `brs` didn't. Look for a
trailing `#` when lexing long numeric literals, to avoid treating it
like a conditional compilation string.
fixes#616
In RBI it's perfectly valid to use a numeric literal of more than ten characters and still use the
#
operator to explicitly mark it as a double. Inbrs
, that causes a lexing error:The text was updated successfully, but these errors were encountered: