RosettaCodeData/Task/Determine-if-a-string-is-numeric/Prolog/determine-if-a-string-is-numeric-3.pro

8 lines
167 B
Prolog
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
?- test_strings(["123", "0.123", "-123.1", "NotNum", "1."]).
123 is a number.
0.123 is a number.
-123.1 is a number.
NotNum is not a number.
1. is not a number.
true.