Seppo Mustonen : Programming Survo in C

Functions in library SURVO.LIB

prompt
Summary

int prompt(question,answer,maxlength)
char *question; /* prompt text */
char *answer;   /* default/final answer */
int maxlength;  /* max length of the answer */
Description

The prompt function presents a question on the screen giving a default answer and letting the user edit it or type a new answer within the limit given by maxlength.

The place for the prompt can be selected by LOCATE(row,column); . prompt works also under tutorial mode (reading the user's answers from the sucro file).

Return Value

There is no return value. The user's answer will be in answer as a nullterminated string.

See Also

tut_init, nextch

Example

char filename[LNAME];

strcpy(filename,"TEST");
LOCATE(r3+2,1); /* bottom line on the screen */
prompt("Name of file? ",filename,LNAME-1);


Front page of Survo C libraries