RosettaCodeData/Task/Determine-if-a-string-is-numeric/Plain-English/determine-if-a-string-is-numeric.plain
2023-07-01 13:44:08 -04:00

19 lines
692 B
Text

To run:
Start up.
Show whether "cat" is numeric.
Show whether "3" is numeric.
Show whether "+3" is numeric.
Show whether "-123" is numeric.
Show whether "123,456" is numeric.
Show whether "11/5" is numeric.
Show whether "-26-1/3" is numeric.
Show whether "+26-1/3" is numeric.
Show whether "1/0" is numeric. \in Plain English, 1/0 is 0. Don't tell the mathematicians!
Show whether "3.14159" is numeric. \floating point is not implemented in Plain English.
Wait for the escape key.
Shut down.
To show whether a string is numeric:
Write the string then " -> " on the console without advancing.
If the string is any numeric literal, write "yes" on the console; exit.
Write "no" on the console.