https://bugs.documentfoundation.org/show_bug.cgi?id=173941
Bug ID: 173941
Summary: Librelogo fails at hexadecimal numbers in function
parameters
Product: LibreOffice
Version: 27.2.0.0 alpha0+ master
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: [email protected]
Reporter: [email protected]
Description:
Hexadecimal sequences like 0xFFFFFF (and also binary and octal) that are
supported when used in other context, cause an error when used in functions
with arguments separated by spaces. This kind of hexadecimal constants are
supported in the documentation.
I found this error trying to run an old program from the librelogo.org web
page:
https://librelogo.org/2014/04/28/40th-anniversary-of-the-rubiks-cube/
If you add parenthesis to the functions or assign the constants to variables
and then reuse them as the parameter of the function, then everything goes
fine.
I found that the error is caused because, the search for the "atoms" in these
function calls to replace the spaces with parenthesis, matches the 0 in
0xFFFFFF as an independent number, which is not true and ends with an error.
This is easy to fix for me.
Steps to Reproduce:
1. Open Writer
2. View > Toolbars > Logo
2. Write the text: PRINT 0xFFFFFF
3. Click in the Logo toolbar the button to run the program
Actual Results:
Display an Error dialog
Expected Results:
Display a dialog with the given integer 16777215
Reproducible: Always
User Profile Reset: No
Additional Info:
Include parenthesis in the function as in PRINT(0xFFFFFF) or assigning the
value to a variable and then print its value, are workarounds for this.
--
You are receiving this mail because:
You are the assignee for the bug.