[comp.databases] Clipper Error in do case procedure

derykm@oz.plymouth.edu (Dez) (03/29/91)

This is probably an easy question. 
When I write a "do case" procedure then run the program,
I can press the right arrow and get an error at that point in the program. 
It aborts the program completely.  This seems to happen with any
do case procedure I write.  Is there a way to make
the program only respond to a return, and avoid an error if another
key is pressed by mistake? BTW I am using '87 not 5.0 yet.


thanks

deryk

tleylan@pegasus.com (Tom Leylan) (04/01/91)

In article <1991Mar29.153237.15963@oz.plymouth.edu> derykm@oz.plymouth.edu (Dez) writes:
>
>When I write a "do case" procedure then run the program,
>I can press the right arrow and get an error at that point in the program. 
>It aborts the program completely.  This seems to happen with any
>do case procedure I write.  Is there a way to make
>the program only respond to a return, and avoid an error if another
>key is pressed by mistake? BTW I am using '87 not 5.0 yet.
>
Deryk,

Without a piece of code to look at its impossible to determine what it is
that you're doing wrong but most assuredly you can avoid bombing out.

 DO CASE has nothing to do with keyboard input so blindly guessing I think
you are using GET/READ or INKEY() to input data and have a CASE statement
checking for the wrong data type.  You haven't even included the error
message so I'm guessing about my guess.

Try posting the code or the error or check on the idea that you're comparing
a character variable against a numeric constant value or vice versa.

tom
(ex-Senior Systems Analyst / Nantucket Corp.)