CentiZen @ Wed May 12, 2010 11:53 am wrote:
but typing "hello computer" causes the program to crash with the error Case selector is out of range
Just like you've had an "else" part in your if-statement; it might be a good idea to have a default catch-all clause to labels, in case someone types in something unexpected
code: |
case test of
label "hello computer" : put "Hello Michael"
label "hellocomputer" : put "HelloMichael"
label : put "unknown case for: ", test
end case
|