RosettaCodeData/Task/Determine-if-a-string-is-numeric/J/determine-if-a-string-is-numeric-1.j

4 lines
168 B
Text
Raw Permalink Normal View History

2013-04-10 21:29:02 -07:00
isNumeric=: _ ~: _ ". ]
isNumericScalar=: 1 -: isNumeric
TXT=: ,&' a scalar numeric value.' &.> ' is not';' represents'
sayIsNumericScalar=: , TXT {::~ isNumericScalar