home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.pascal:7951 comp.os.msdos.programmer:11875
- Newsgroups: comp.lang.pascal,comp.os.msdos.programmer
- Path: sparky!uunet!math.fu-berlin.de!news.belwue.de!news.uni-stuttgart.de!delos!sinus!stefan
- From: stefan@sinus.stgt.sub.org (Stefan Bechtold)
- Subject: Case/readln Question
- Message-ID: <1993Jan6.004700.207@sinus.stgt.sub.org>
- Organization: Sinus Stuttgart, Germany
- Date: Wed, 6 Jan 1993 00:47:00 GMT
- Lines: 27
-
- Hi !
-
- I've a question;
- What I want to do is a menue with 15 items; therefore I've to use
- the case statement under TurboPascal6.
-
- But if I use char-type for the variable which is controlled
- by case it doesn't work as the case-statement only accepts
- 1..9, not numbers with two digits (as 10..15).
-
- So I could use integer-type where it works, in fact. But when I use integer and
- type some char like a letter (e.g. 'A') , the case-loop exits (as
- 'A' is a char/string, but no integer).
-
- What I want to do:
- I want to control 15 numbers by a case-statement (so I do have to use
- integer, doesn't I ?), but also want to control all other chars typed in
- (so that the program doesn't exit but prints an error message.)
-
- Do you have any solution ?
-
- Thank you very much in advance,
- Stefan
- --
- + Stefan Bechtold # stefanb@delos.stgt.sub.org # Voice +49 711 813240 +
- ++++++++sed nemo potuit tangere: merda fuit ! (Martial III 17)+++++++++
-
-