PROC main()
DEF a,s[16]:STRING
PrintF('Enter a number 1-10: \n')
ReadEStr(stdout,s)
a:=Val(s)
SELECT a
SELECTED; PrintF('good selection!\n')
DEFAULT; PrintF('bad number!\n')
CASE 1 TO 3; PrintF('gimme more!\n')
CASE 4 TO 6; PrintF('average!\n')
CASE 7 TO 9; PrintF('that much?\n')
CASE 10; PrintF('too much...\n')
ENDSELECT
ENDPROC
PROC main()
DEF a,s[16]:STRING
PrintF('Enter Your age 1-100: \n')
ReadEStr(stdout,s)
a:=Val(s)
PrintF('You are \s.\n',
SELECT a
CASE 0 TO 3 IS 'small baby'
CASE 4 TO 6 IS 'baby'
CASE 7 TO 10 IS 'child'
CASE 11 TO 19 IS 'teenager'
CASE 20 TO 50 IS 'adult'
CASE 51 TO 99 IS 'old'
DEFAULT IS 'not a human ;)'
ENDSELECT)
ENDPROC