sds_getint

int sds_getint (const char *prompt, int *answer);


Ask the user to specify an integer.


This function pauses to get an integer from the user. You may prompt the user to enter the integer.

The argument prompt represents a command-line prompt requesting that the user enter an integer.This argument may be null.

The answer argument is the integer entered by the user. The valid range is a short integer between -32768 and 32767.

This function returns RTCAN (when the user presses Esc), RTERROR (when it fails), or RTNORM (when it succeeds). If the prior function was sds_initget, this function may return RTKWORD or RTNONE.

Example

int int1;

sds_getint("\nPlease enter an integer: ",&int1);

sds_printf("\nThe integer you entered is %i. ",int1);

Tell me about...

Programming Overview of SDS™ (Solutions Development System™)

sds_getreal