Command Prompt for Windows

Command GETNUM


Wait for a number to be entered by the user. The number is stored in an environment variable called GETNUM.


GETNUM [message]
messageSequence of characters.


When the sequence of characters entered by the user is not a valid number, this is, not an integer or a real number then the environment variable is cleared.

Example on using GETNUM.

Also see command GETKEY, GETSTR and Batch Files.