mr@cica.cica.indiana.edu (Michael Regoli) (07/13/89)
mithomas@bsu-cs.bsu.edu (Michael Thomas Niehaus) writes: >I have a question that maybe some dBase IV person can answer. Let's say that >I have the following chunk of dBase code: >T="this is a test" >IF T="this is not a test" THEN > @10,10 say "Inside the if" >ENIF && Notice the misspelling >@11,10 SAY "Outside the if" >RETURN >Can anyone tell me what dBase IV does with this? If it returns an error >message, I would switch instantly. here's what IV does with the above six lines in a file called foo.prg: . do foo.prg Compiling line 2 IF T="this is not a test" THEN Warning on line 3: Extra characters ignored at end of command Compiling line 4 ENIF Error on line 4: *** Unrecognized command verb Compiling line 6 RETURN Error on line 7: Missing ENDIF for previous IF command && && it dies here and tries to read another line && beyond the RETURN on line 6. && -- michael regoli mr@cica.indiana.edu regoli@iubacs.bitnet ...rutgers!iuvax!cica!mr
keithb@hpindda.HP.COM (Keith Broussard) (07/17/89)
In dBase IV, there is no ELSE on the IF/ENDIF command structure. You receive EXTRA CHARACTERS IGNORED AT EOL since you put a 'THEN' there. Also, you received an error because you spelled ENDIF wrong. The rest of your program looks fine. Fix foo and recompile. Good luck