Re: Phix vs OE syntax // switch

new topic     » goto parent     » topic index » view thread      » older message » newer message

Phix fully supports that OE syntax, with the same results as the Phix-only version above (ie j ends up 10).

In the Phix switch statement, do is optional and ":" and "then" are interchangeable.

Phix allows several such syntax variations, mainly to ease the translation of C into Phix, the most notable of which is the optional ; statement separator.
Just last month I also added support for the ORAC-isms int[eger], seq[uence], ~s for length(s), s.i for s[i], and s[i to j] for s[i..j] - you are not obliged to use them. (set ORAC to 0 if no likely)
If you think it would help, I could easily add "--/**/with strict_oe_syntax" or somesuch, on the understanding it would not cover sequence ops and equal/compare use, or implicit function discard (etc).

Pete

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu