Heuristic Logo->Python precompiler of LibreLogo often doesn't handle complex expressions correctly, also with the suggested extra parentheses. For example PRINT RANDOM [1, 2] * RANDOM [3, 4] results compiling error. We need a plausible syntax for expressions and fast precompiling to handle Python lists and other complex expressions in LibreLogo function arguments etc.
László Németh committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/740b99783b5480fcd1e5fce7c1beb5967d015041%5E%21 tdf#120413 LibreLogo: handle complex Logo expressions It will be available in 6.2.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Fixed for Logo functions (default and newly defined ones) and for newly defined procedures, also for the default PRINT procedure: tdf#120413 LibreLogo: handle complex Logo expressions Instead of the incomplete heuristic parenthesis expansion, now expressions with Logo functions and with own procedures are parsed completely, solving several issues with complex Logo expressions. For example, now functions with more than 1 argument don't need explicit parenthesization. NOTE: to handle both Logo and Python syntaxes of function calls, we differentiate the forms "f(x)" and "f (x)". The second form is handled as Logo syntax, not the Python one: f x*2 y z -> f(x*2, y, z) f(x*2, x, z) -> f(x*2, y, z) f (x*2) y z -> f((x*2), y, z) so if you want to avoid of the following expansion: sin 45 + cos 45 -> sin(45 + cos(45)) it's possible to use the following parenthesizations: sin(45) + cos 45 -> sin(45) + cos(45) (sin 45) + cos 45 -> (sin(45)) + cos(45) but not sin (45) + cos 45 -> sin((45) + cos(45))