RosettaCodeData/Task/String-comparison/11l/string-comparison.11l

12 lines
538 B
Plaintext
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

F compare(a, b)
I a < b {print('#.' is strictly less than '#.'.format(a, b))}
I a <= b {print('#.' is less than or equal to '#.'.format(a, b))}
I a > b {print('#.' is strictly greater than '#.'.format(a, b))}
I a >= b {print('#.' is greater than or equal to '#.'.format(a, b))}
I a == b {print('#.' is equal to '#.'.format(a, b))}
I a != b {print('#.' is not equal to '#.'.format(a, b))}
compare(YUP, YUP)
compare(BALL, BELL)
compare(24, 123)