Determine if a string is numeric: Difference between revisions

(Added GNU APL (APL2) version)
Line 2,012:
h = h
.
testfor s$[] =in [ "abc" "21a" "1234" "-13" "7.65" ]
call is_numeric tests$[i] r
for i range len test$[]
call is_numeric test$[i] r
if r = 1
print tests$[i] & " is numeric"
else
print tests$[i] & " is not numeric"
.
.</lang>
1,982

edits