<<

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