|
If I recall, isalpha() tests one character at a time.
I think the prototype should look something like this (I didn't test it):
d isalpha pr 10i 0 extproc('isalpha')
d testchar 1 value
If the character is alphabetic, the function will return 1, otherwise 0.
> -----Original Message-----
> From: Eric Kempter [mailto:EKempter@norcalwaste.com]
> Sent: Wednesday, January 23, 2002 12:52 PM
> To: midrange-l@midrange.com
> Subject: isalpha
>
>
> Would someone please give me an example of how to use the isalpha C
> runtime function within an ILE pgm. I have printed examples on how to
> use C functions from the archives and referenced the Sorcerer's guide
> but I am missing something. The following is my (failing) code. I am
> attempting to determine if any alpha characters exist within a string.
>
> H dftactgrp(*no) bnddir('QC2LE')
> D num s 10I 0
> D str s 10 inz('ABC')
> D isalpha pr ExtProc('isalpha')
> D 10I 0 Value
> C eval num = isalpha(str)
> C num dsply
> C eval *inlr = *on
>
> Parts of the code was provided to midrange-l by Hans Boldt. TIA.
> _______________________________________________
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.