'
'
'
' A simple calculator to demonstrate Eval
'
'
'
'$INCLUDE: 'eval.bi'

IF COMMAND$ = "" THEN

        PRINT
        PRINT "CALC Ver 1.0  --  Copyright [c] 1990 Applied Design Group"
        PRINT "         Hit RETURN on a blank line to exit."
        PRINT

        a$ = " "
        WHILE LEN(a$)
                b$ = ""
                INPUT "  calc>", a$
                IF LEN(a$) THEN PRINT "answer> "; Eval#(a$, b$)
                IF LEN(b$) THEN PRINT " error> "; b$
                PRINT
        WEND

ELSE
        PRINT Eval#(COMMAND$, b$)
        IF LEN(b$) THEN PRINT " error> "; b$
        PRINT
END IF

