Determine if a string is numeric: Difference between revisions
Content added Content deleted
(Added GNU APL (APL2) version) |
|||
Line 2,012: | Line 2,012: | ||
h = h |
h = h |
||
. |
. |
||
for s$ in [ "abc" "21a" "1234" "-13" "7.65" ] |
|||
⚫ | |||
for i range len test$[] |
|||
⚫ | |||
if r = 1 |
if r = 1 |
||
print |
print s$ & " is numeric" |
||
else |
else |
||
print |
print s$ & " is not numeric" |
||
. |
. |
||
.</lang> |
.</lang> |