Conditional structures: Difference between revisions
Content added Content deleted
(→{{header|Perl 6}}: add missing stuff) |
(+ МК-61/52) |
||
Line 1,933: | Line 1,933: | ||
There are no other kind of conditional structures, but the great flexibility of Metafont allows for sure to create "new syntaxes" similar to <tt>switches</tt> or whatever needed. |
There are no other kind of conditional structures, but the great flexibility of Metafont allows for sure to create "new syntaxes" similar to <tt>switches</tt> or whatever needed. |
||
=={{header|МК-61/52}}== |
|||
Conditional jumps are done by four instructions, comparing the register X with zero: |
|||
<lang>x=0 XX |
|||
x#0 XX |
|||
x>=0 XX |
|||
x<0 XX</lang> |
|||
'''XX''' here is the address to which to make the jump in the event of failure of this condition (for this reason, these instructions are also called checks). |
|||
=={{header|Modula-2}}== |
=={{header|Modula-2}}== |