Peter has enhanced the compare syntax in the language to work in a more traditional Basic way.
Now BaCon has genuine BASIC comparison syntax for both numbers and strings, in addition to the existing ways of comparison. It will be available from build 21.
Number comparison current way:
a = 10
IF a EQ 10 THEN PRINT "Success"
IF a NE 10 THEN PRINT "Failed"
Number comparison new way:
a = 10
IF a = 10 THEN PRINT "Success"
IF a != 10 THEN PRINT "Failed"
String comparison current way:
a$ = "Hello"
b$ = "World"
IF EQUAL(a$, b$) THEN PRINT "Success"
IF NOT(EQUAL(a$, b$)) THEN PRINT "Failed"
String comparison new way:
a$ = "Hello"
b$ = "World"
IF a$ = b$ THEN PRINT "Success"
IF a$ != b$ THEN PRINT "Failed"
Of course this syntax also works for REPEAT/UNTIL and WHILE/WEND and handles combinations with AND and OR. And as usual OPTION COMPARE determines case sensitive comparison in case of strings.
Regards
Peter
Bacon Project Site