Pauses for user input of an integer, and returns that integer
(getint [msg])
Values passed to getint can range from -32,768 to +32,767. If the user enters something other than an integer, getint displays the message, “Requires an integer value,” and allows the user to try again. The user cannot enter another AutoLISP expression as the response to a getint request.
The integer specified by the user; otherwise nil, if the user presses ENTER without entering an integer.
Command: (setq num (getint))
15
15
Command: (setq num (getint "Enter a number:"))
Enter a number: 25
25
Command: (setq num (getint))
15.0
Requires an integer value.
15
15
-
The initget function.
The getxxx Functions in the AutoLISP Developer's Guide.