Inverted syntax: Difference between revisions

Content added Content deleted
(add RPL)
Line 1,240: Line 1,240:
zz=444 / (7-a)
zz=444 / (7-a)
</pre>
</pre>

=={{header|RPL}}==
Assigning values to variables using <code>→</code> or <code>STO</code> commands presents an inverted syntax in RPL. It's also possible to invert syntax for conditional expressions, by pushing the action in the stack as a lambda expression before doing the test, but this isn't idiomatic.
≪ 1 → raining <span style="color:grey">@ Set raining to true</span>
≪ ≪ NEEDUMBRELLA ≫
'''IF''' raining '''THEN''' EVAL '''ELSE''' DROP '''END''' <span style="color:grey">@ Execute above action if true, else pop it from stack</span>
≫ ≫ '<span style="color:blue">TASK</span>' STO <span style="color:grey">@ Store above program in TASK variable</span>


=={{header|Ruby}}==
=={{header|Ruby}}==