Re: Something new and exciting
Posted in 1995
In article <3grifo$5uq@cssun.mathcs.emory.edu> jparker@hpbs3645.boi.hp.com (Jack Parker) writes: > >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 Jack, I think you just got lucky with your test cases and your C stack. You are calling the *true* functional versions of these macros which are in most/every standard C library implementation. There is no way that Informix is providing 4GL stack compliant versions. Sorry, Scott Note: Some compilers/linkers support the -y option. It is *very* useful in determining when a symbol (in this case the function name) becomes referenced/unresolved and where the symbol is resolved in terms of library name and the .o within the library. For example if you compile your program with -y_isalpha (C prepends function names with _), then you will see exactly where _isalpha is referenced/used and where the text for that function resides.