int getint (prompt,min,max,defalt); char *prompt; int min,max,defalt; long getlong (prompt,min,max,defalt); char *prompt; long min,max,defalt; short getshort (prompt,min,max,defalt); char *prompt; short min,max,defalt;
They begin by printing the string prompt as a message to the user. The user then types in a number. If the number is valid and is within the range min to max, then it is returned as the value of getint (getlong, getshort). If it is invalid or is out of range, then an error message is printed and the prompt-and-response cycle is repeated. If the user types just a carriage return, then the value defalt is assumed.
Getint, getlong, and getshort are identical, except for the type of the parameters and the results.