Order of operations should follow order of warnings in eval
Nikolaos Chatzikonstantinou <[email protected]> Tue, 13 May 2025 00:13:42 -0400
| Newsgroups | gmane.comp.gnu.m4.general |
|---|---|
| Message-ID | <CAAQmekdHBLN-Dbqu54B=VuprCD9W=goE6ymDNsbu94D9qDbtrA@mail.gmail.com> |
I'm trying to think of what the output of this program should be: eval(1 = 2 = 3 / 0) Since it should be equal to eval((1 = 2) = (3 / 0)) I'd assume it should warn as follows: m4:stdin:1: Warning: recommend ==, not =, for equality operator m4:stdin:1: divide by zero in eval: 1 = 2 = 3 / 0 m4:stdin:1: Warning: recommend ==, not =, for equality operator which would be the breadth-first left-to-right evaluation strategy, but instead it warns like so: m4:stdin:1: Warning: recommend ==, not =, for equality operator m4:stdin:1: Warning: recommend ==, not =, for equality operator m4:stdin:1: divide by zero in eval: 1 = 2 = 3 / 0 which is the depth-first left-to-right evaluation. Although, I'm not entirely sure. Regards, Nikolaos Chatzikonstantinou