Integer comparison: Difference between revisions

Content added Content deleted
(Undo revision 24787 by 62.194.126.7 (Talk) need to use all three operators)
Line 196: Line 196:


: compare-integers ( a b -- )
: compare-integers ( a b -- )
2dup < if ." a is less than b" 2drop exit then
2dup < if ." a is less than b" then
> if ." a is greater than b" exit then
2dup > if ." a is greater than b" then
." a is equal to b" ;
= if ." a is equal to b" then ;


=={{header|Fortran}}==
=={{header|Fortran}}==