Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-Filex<y x>y x<=y x>=y x, y: exp These operators serve to compare the size of numerical and string expressions. With numerical expressions the values are compared, and with string expressions the comparison depends on the ASCII codes of the characters. The string "ABC" is treated as the number sequence 65, 66,and 67. In the comparison "ABC">"AAA", the first characters are compared, which both have the ASCII code 65. Then the next character is compared. There "B" has a higher code value than "A", and "B" is then taken as the 'larger'. Here the comparison of the two strings is broken off, and the statement "ABC" is larger than "AAA" is deemed logically TRUE. A special case of the comparison crops up if the two strings end before an inequality is discovered. An example would be: "AA">"A". This statement is rated logically TRUE, as is "A"+CHR$(0)>"A". Now to the individual operators: x>y TRUE if x is greater than y. x<y TRUE if x is less than y. x>=y TRUE if x is greater than, or equal to y. x<=y TRUE if x is less than, or equal to y. The following are equivalent ways of writing the same expressions: x<=y or x=<y x>=y or x=>y Example: PRINT "AAA">"aaa" PRINT -1<=4-5 --> The numbers -1 and -1 are printed.