Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with Valid 2

Status
Not open for further replies.

fbizzell

Programmer
Jul 3, 2000
217
I am trying to use the Valid command or function and have used it in the past but all of a sudden I can't get it to work. What is wrong with this code:

ndropoff:=0
@ 5,10 say "Enter drop off" get ndropoff valid ; ndropoff>=1.00
read

It should not let me enter .50 but it does.



 
Hi fbizzell,

Try this instead:

Code:
ndropoff:=0
@ 5,10 say "Enter drop off" get ndropoff valid(ndropoff>=1)
read
quit

Untested.

Regards,

Mike
 
Pretty close, you need to initialise the ndropoff to a non-integer value...

After that it works well.

Code:
ndropoff =0.00
@ 5,10 say "Enter drop off" get ndropoff valid(ndropoff>=1)
read

Regards

Griff
Keep [Smile]ing
 
PS I tested it in VFP

Regards

Griff
Keep [Smile]ing
 
Thanks mspratt and Griffmg. I will give this another shot in the morning.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top