Last active
August 1, 2018 14:34
-
-
Save yvan/137dad60e7c6eff46d90bce1bead7960 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
*> NOT, negating a conditional | |
MOVE 50 TO NUM1. | |
MOVE 60 TO NUM2. | |
IF NOT NUM2 IS LESS THAN NUM1 THEN | |
DISPLAY NUM2' IS NOT LESS THAN 'NUM1 | |
END-IF | |
*> AND, having multiple conditionals | |
IF NUM1 IS LESS THAN NUM2 AND NUM1 IS LESS THAN 100 THEN | |
DISPLAY 'COMBINED CONDITION' | |
ELSE | |
DISPLAY 'NAH' | |
END-IF | |
*> checking for negative or positive values | |
IF NEG-NUM IS POSITIVE OR NEG-NUM IS NEGATIVE THEN | |
DISPLAY 'A NUMBER IS POSITIVE'. | |
*> checking for negative or positive values | |
IF NEG-NUM IS NEGATIVE THEN | |
DISPLAY 'A NUMBER IS NEGATIVE'. | |
*> checking if a variable is a certain | |
*> data type | |
IF CLASS1 IS ALPHABETIC OR CLASS1 IS NUMERIC THEN | |
DISPLAY 'CLASS1 IS ALPHABETIC or numeric'. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment