' COMPARE.BAS
' This program compares any two characters.

CLS

INPUT "Enter any character:  ", firstChar$
INPUT "Enter another character:  ", secondChar$
PRINT

SELECT CASE ASC(firstChar$) - ASC(secondChar$)
    CASE IS < 0
        PRINT "'"; firstChar$; "' comes before '"; secondChar$; "'"
        PRINT "because"; ASC(firstChar$); "is less than"; ASC(secondChar$)
    CASE IS > 0
        PRINT "'"; firstChar$; "' comes after '"; secondChar$; "'"
        PRINT "because"; ASC(firstChar$); "is more than"; ASC(secondChar$)
    CASE ELSE
        PRINT "'"; firstChar$; "' is the same as '"; secondChar$; "'"
        PRINT "because"; ASC(firstChar$); "is equal to"; ASC(secondChar$)
END SELECT


