|
I hate TESTN: - Not supported in Free. - As far as I can remember, it does not recognize decimal point, + and - sign. - Worst of all, you got three different indicator that tells you three different conditions. I usually do one of these two: //If ony 0 to 9 is allow, I do below if %check('1234567890' :charFld) > 0; // not a number; Else; // is a number endif; or //if any numeric notation is allow, I do below: Monitor; dummyInt = %int(%trim(charFld)); on-error; // not a number Endmon; -----Original Message----- From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Buck In the end, I took the path that was easiest for me to write. If another programmer needs to maintain this one-timer (they never really are just one-timers, are they?) then I'm not at all sorry that he might have to read up on * report fields that should be numbers but aren't * note that empty (blank) fields are OK TESTN charfld 2020 n20 EXCEPT badCharfld In the end, my comfort with indicators in this context outweighed the distaste for global variables. --buck
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 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.