PromptForYesOrNo

Sends a yes/no prompt to the specified screen.

Library:LibC
Classification:NetWare OS
Service:Screen Support

Syntax

  #include <screen.h> 
   
  int PromptForYesOrNo (
     scr_t         scrID,
     int           linesToProtect,
     int           defaultValue,
     const void   *promptText,
     ... );
  

Parameters

scrID

(IN) Specifies the screen that receives the prompt.

linesToProtect

(IN) Specifies the number of lines that have to be protected from the current input row upwards. Thus, if linesToProtect is 2 and the current input row number is 4, rows 3 and 4 have to protected.

defaultValue

(IN) Specifies whether yes or no is the default value with one of the following:

Constant

Value

Description

SCR_PROMPT_ANSWER_NO

0

The no response is marked as the default.

SCR_PROMPT_ANSWER_YES

1

The yes response is marked as the default.

promptText

(IN) Points to the text contain the question that users must answer with either a yes or a no.

...

(IN) Points to an argument for a printf conversion specifier. The number of arguments is determined by the promptText string.

Return Values

Returns the response of the user: 0 for no and 1 for yes.

See Also