' MENU.BAS
' This program demonstrates the LEN function.

missMuffet$ = "Curds and Whey"         ' declare meal strings
simpleSimon$ = "Pie du Jour"
petersPlate$ = "Pumpkin Surprise"

CLS
                                                                        
PRINT "Which meal would you enjoy?"    ' display meal prompt
PRINT

PRINT missMuffet$                      ' display meal choices
PRINT simpleSimon$
PRINT petersPlate$
PRINT

INPUT "Selection:  ", choice$          ' get meal choice from user
choice$ = UCASE$(choice$)              ' convert string to uppercase
PRINT

SELECT CASE choice$                    ' find variable that matches
    CASE IS = UCASE$(missMuffet$)      '   meal entered and print length
        PRINT missMuffet$; " is"; LEN(missMuffet$); "characters long"
    CASE IS = UCASE$(simpleSimon$)
        PRINT simpleSimon$; " is"; LEN(simpleSimon$); "characters long"
    CASE IS = UCASE$(petersPlate$)
        PRINT petersPlate$; " is"; LEN(petersPlate$); "characters long"
    CASE ELSE                          ' print message if no match found
        PRINT "I don't recognize that meal!"
END SELECT

