Data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 7387c8f97b
commit cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions

View file

@ -0,0 +1,49 @@
isnumeric
$Typecheck on
Defint FALSE, TRUE
FALSE = 0
TRUE = NOT FALSE
Function isNumeric(s as string, optchar as string) as integer
If len(s) = 0 then
Result = FALSE
Exit Function
End If
if instr(s,"+") > 1 then
Result = FALSE
exit function
end if
if instr(s,"-") > 1 then
Result = FALSE
exit function
end if
Defint i, ndex = 0
For i = 1 to len(s)
select case asc(mid$(s,i,1))
case 43 '+
case 45 '-
case 46 '.
if ndex = 1 then
Result = FALSE
Exit function
end if
ndex = 1
case 48 to 57 '0 to 9
case else
if instr(optchar,(mid$(s,i,1))) = 0 then
Result = FALSE
exit function
end if
end select
next
Result = TRUE
End Function
'============================================================
'Begin
'============================================================
showmessage (str$(isNumeric("-152.34","")))
end