Hello,
Because PB not have (For the moment), I write this function:
Code: Select all
;Function for check only numeric characters into 1 field or in one string variable
;is valid for check differents charactes, only change the compare variable
OpenConsole()
Procedure.f Num(value.s)
result=0
compare.s="1234567890.-"
For i=1 To Len(value)
res=FindString(compare,(Mid(value,i,1)),1)
If res=0
result=result+1
EndIf
Next
ProcedureReturn result
EndProcedure
in:
a$=Input()
If Num(a$)=0
PrintN("CORRECT NUMBER"+valor$)
Else
PrintN("INCORRECTO. NOT NUMERICAL CHARACTERS"+valor$)
EndIf
Goto in:
Delay(10000)
Manolo
[url]mailto:vpardo@infonegocio.com[/url]