Another example of determining 3 input values:
COLOR 15
DO
PRINT "Enter values(y/n)";: INPUT x$
IF LCASE$(x$) = "n" THEN END
PRINT "Enter X,Y,Z";: INPUT X, Y, Z
GOSUB Calculate
LOOP
END
Calculate:
SELECT CASE X
CASE IS > 0
SELECT CASE Y
CASE IS > 0
SELECT CASE Z
CASE IS > 0
PRINT "X is positive, Y is positive, Z is positive."
CASE IS < 0
PRINT "X is positive, Y is positive, Z is negative."
CASE ELSE
PRINT "X is positive, Y is positive, Z is zero."
END SELECT
CASE IS < 0
SELECT CASE Z
CASE IS > 0
PRINT "X is positive, Y is negative, Z is positive."
CASE IS < 0
PRINT "X is positive, Y is negative, Z is negative."
CASE ELSE
PRINT "X is positive, Y is negative, Z is zero."
END SELECT
CASE ELSE
SELECT CASE Z
CASE IS > 0
PRINT "X is positive, Y is zero, Z is positive."
CASE IS < 0
PRINT "X is positive, Y is zero, Z is negative."
CASE ELSE
PRINT "X is positive, Y is zero, Z is zero."
END SELECT
END SELECT
CASE IS < 0
SELECT CASE Y
CASE IS > 0
SELECT CASE Z
CASE IS > 0
PRINT "X is negative, Y is positive, Z is positive."
CASE IS < 0
PRINT "X is negative, Y is positive, Z is negative."
CASE ELSE
PRINT "X is negative, Y is positive, Z is zero."
END SELECT
CASE IS < 0
SELECT CASE Z
CASE IS > 0
PRINT "X is negative, Y is negative, Z is positive."
CASE IS < 0
PRINT "X is negative, Y is negative, Z is negative."
CASE ELSE
PRINT "X is negative, Y is negative, Z is zero."
END SELECT
CASE ELSE
SELECT CASE Z
CASE IS > 0
PRINT "X is negative, Y is zero, Z is positive."
CASE IS < 0
PRINT "X is negative, Y is zero, Z is negative."
CASE ELSE
PRINT "X is negative, Y is zero, Z is zero."
END SELECT
END SELECT
CASE ELSE
SELECT CASE Y
CASE IS > 0
SELECT CASE Z
CASE IS > 0
PRINT "X is zero, Y is positive, Z is positive."
CASE IS < 0
PRINT "X is zero, Y is positive, Z is negative."
CASE ELSE
PRINT "X is zero, Y is positive, Z is zero."
END SELECT
CASE IS < 0
SELECT CASE Z
CASE IS > 0
PRINT "X is zero, Y is negative, Z is positive."
CASE IS < 0
PRINT "X is zero, Y is negative, Z is negative."
CASE ELSE
PRINT "X is zero, Y is negative, Z is zero."
END SELECT
CASE ELSE
SELECT CASE Z
CASE IS > 0
PRINT "X is zero, Y is zero, Z is positive."
CASE IS < 0
PRINT "X is zero, Y is zero, Z is negative."
CASE ELSE
PRINT "X is zero, Y is zero, Z is zero."
END SELECT
END SELECT
END SELECT
RETURN