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: firstname.lastname@example.org > 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.
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.