int prompt(question,answer,maxlength)
char *question; /* prompt text */
char *answer; /* default/final answer */
int maxlength; /* max length of the answer */
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).
There is no return value. The user's answer will be in answer
as a
nullterminated string.
char filename[LNAME];
strcpy(filename,"TEST");
LOCATE(r3+2,1); /* bottom line on the screen */
prompt("Name of file? ",filename,LNAME-1);