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
The numerical literals part, you might be read the document wrong.
Numbers are (unsigned) integers or real numbers. Integers are sequences of digits. If the number is followed by the letter B, it is taken as an octal number; if it is followed by the letter H, it is taken as a hexadecimal number; if it is followed by the letter C, it denotes the character with the given (octal) ordinal number (and is of type CHAR).
Taken from your code: local modula_octal = R("07")^1*R("BC")
Please pardon me as I don't understand Lua, but only with either B or C is enough for it to be an octal number, not needed to be both BC. In case it has both B, C and H then it will be a hex number.
Note: please notice on the examples on the document, B and C will never go together unless they are also go with H. I don't understand EBNF, but I think | is or so it's B or C not B and C.
The text was updated successfully, but these errors were encountered:
The numerical literals part, you might be read the document wrong.
https://www.modula2.org/reference/vocabulary.php
Taken from your code:
local modula_octal = R("07")^1*R("BC")
Please pardon me as I don't understand Lua, but only with either
B
orC
is enough for it to be an octal number, not needed to be bothBC
. In case it has bothB
,C
andH
then it will be a hex number.Note: please notice on the examples on the document,
B
andC
will never go together unless they are also go withH
. I don't understand EBNF, but I think|
isor
so it'sB
orC
notB
andC
.The text was updated successfully, but these errors were encountered: