Something new and exciting
Posted in 1995
Well, perhaps not exciting. Stumbling through some verification on inbound data I ran into a need to test for isalpha() and isdigit() from the 'c' macros. Just for grins I compiled and tested w/o worrying about identifying these macros (Hey - they are sort of standard 'c' dudes). It worked just fine. To wit: MAIN DEFINE vr CHAR(1) LET vr="0" IF isalpha(vr) THEN DISPLAY "Alpha" ELSE DISPLAY "Not alpha" END IF LET vr="A" IF isalpha(vr) THEN DISPLAY "Alpha" ELSE DISPLAY "Not alpha" END IF LET vr="9" IF isdigit(vr) THEN DISPLAY "Digit" ELSE DISPLAY "Not Digit" END IF END MAIN j. _____________________________________________________________________________ Jack Parker - Hewlett Packard, BSMC Boise, Idaho, USA jparker@hpbs3645.boi.hp.com _____________________________________________________________________________ Subtlety is the art of saying what you think and getting out of the way before it is understood. _____________________________________________________________________________ Any opinions expressed herein are my own and not those of my employers. _____________________________________________________________________________