Larry, that user's name wouldn't perchance be "Zoot", of the domain, "Castle 
Anthrax", would it?

Perhaps I Could Stay A Bit Longer,
Steve in Memphis
=-)


From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Lawrence Lustig
Sent: Wednesday, May 21, 2008 4:11pm 16:11
To: RBASE-L Mailing List
Subject: [RBASE-L] - Re: Testing text variable for non-numeric characters

<<
How do I test a user-input text variable to verify that it contains only digits 
(no letters, punctuation or symbols)?   I want to be able to reject an 
inappropriate entry.   It needs to be text because there are often leading 
zeros.
>>

To check variable vUserInput:

IF vUserInput = (SKEEP(.vUserInput, '0123456789')) THEN
  PAUSE 2 USING 'Good User!'
ELSE
  PAUSE 2 USING 'Naughty, Naughty User!'
ENDIF

You might also want to investigate format masking on the input DIALOG statement 
to stop the unwanted characters from even being entered.
--
Larry


Reply via email to