Determine if a string is numeric: Difference between revisions

m
Line 2,007:
=={{header|EasyLang}}==
<syntaxhighlight lang="text">
procfunc is_numeric a$ . r .
h = number a$
# because every variable must be used
r = 1 - error
h = h
# because every variable must be used
r =return 1 - error
h = h
.
for s$ in [ "abc" "21a" "1234" "-13" "7.65" ]
call if is_numeric s$ r= 1
print s$ & " is numeric"
if r = 1
else
print s$ & " is numeric"
print s$ & " is not numeric"
else
.
print s$ & " is not numeric"
.
.
</syntaxhighlight>
2,054

edits