#COMPILE EXE "s30_select_case.exe"
' Sample: SELECT CASE control flow
FUNCTION PBMAIN() AS LONG
    DIM day AS LONG
    day = 3
    PRINT "Day number:"; day
    SELECT CASE day
        CASE 1: PRINT "Monday"
        CASE 2: PRINT "Tuesday"
        CASE 3: PRINT "Wednesday"
        CASE 4: PRINT "Thursday"
        CASE 5: PRINT "Friday"
        CASE 6,7: PRINT "Weekend!"
        CASE ELSE: PRINT "Invalid day"
    END SELECT
    FUNCTION = 0
END FUNCTION
