[Libreoffice-bugs] [Bug 120413] LibreLogo: handle complex expressions

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Mon Nov 5 15:49:56 UTC 2018


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

László Németh <nemeth at numbertext.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|NEW                         |RESOLVED

--- Comment #2 from László Németh <nemeth at numbertext.org> ---
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))

-- 
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/20181105/88daaae3/attachment-0001.html>


More information about the Libreoffice-bugs mailing list