getint

(getint [prompt])

The getint function prompts the user to enter an integer value and returns the value specified by the user.

The integer value must be in the range -2147483648 to 2147483647.

Arguments

If the optional argument prompt contains a valid string, it is displayed in the Command Window; otherwise, no prompt is displayed.

Return Value

The function returns the integer value specified by the user.

Examples

: (getint)

: (getint "Specify an integer value: ")

Related Functions

initget, getreal