[Libreoffice-bugs] [Bug 136801] BASIC: CInt("+2") returns 0

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Nov 27 19:33:45 UTC 2020


https://bugs.documentfoundation.org/show_bug.cgi?id=136801

--- Comment #8 from Wolfgang Jäger <jag at psilosoph.de> ---
(In reply to Alain Romedenne from comment #7)
> Wolfgang,
> 
> Can you provide a link to the quoted documentation?

The Link is
https://docs.oasis-open.org/office/OpenDocument/v1.3/cs01/part4-formula/OpenDocument-v1.3-cs01-part4-formula.html#__RefHeading__1017936_715980110.

IMO the definition should read:  

5.3 (rectified) Constant Numbers
Constant numbers are written using '.' (FULL STOP, U+002E) dot as the decimal
separator. Optional "E" or "e" denotes scientific notation (exponent
separator). Syntactically, negative numbers are unsigned numbers with a prefix
"-" (HYPHEN-MINUS, U+002D) operator. Evaluators should also accept the "+"
(PLUS SIGN, U+002B) prefixed to and unsigned number. A constant number is of
type Number. 
Number::=StandardNumber|[-+]?'.'[0-9]+([eE][-+]?[0-9]+)?
StandardNumber::=[-+]?[0-9]+('.'[0-9]+)?([eE][-+]?[0-9]+)?

Evaluators should be able to read the Number format, which accepts a decimal
fraction that starts with decimal point '.' (FULL STOP, U+002E), without a
leading zero. Evaluators shall write numbers only using the StandardNumber
format, which requires a leading digit, and shall not write numbers with a
leading '.' (FULL STOP, U+002E). Whether positive numbers are written with the
plus sign or without may be implementation dependent. 

===
Clearer:
Sign::=U002d|U002b
Decimalseparator::=U002e
Exponentseparator::=E|e
Unsignedinteger::=Digit+
Integer::=Sign?Unsignedinteger
Decimalfraction::=DecimalseparatorUnsignedinteger
Exponentpart::=ExponentseparatorInteger
Nicenumber::=IntegerDecimalfraction?Exponentpart?
Allowednumber::=Nicenumber|Sign?DecimalfractionExponentpart?

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20201127/988f9486/attachment.htm>


More information about the Libreoffice-bugs mailing list