News for hackers. Stuff that matters.
Re:Operator precedence by textual substitution by Taniwha on Monday May 16, 2022 @03:52AM (#31394513)
does it work for unary +/-?
Re:Operator precedence by textual substitution by truly on Monday May 16, 2022 @04:39AM (#31394729)
Almost: +13 would be rewritten to ((()))+(((13))) and -13 to ((()))-(((13))). If you interpret the empty expression as 0, perhaps it would work out.

Good question!

Re:Operator precedence by textual substitution by tgv on Monday May 16, 2022 @05:24AM (#31394975)
There are other unary operators (!, ~), although I'm almost sure FORTRAN didn't support those, but 1 - -13 => 1 - 0 - 13 = -12 would fail, wouldn't it?
Re:Operator precedence by textual substitution by Taniwha on Monday May 16, 2022 @03:57PM (#31402476)
No, not in Fortran of that era ~ was pretty much missing from most card punch keyboards