PromptForString

Sends a string prompt to the specified screen.

Library:LibC
Classification:Novell
Service:Screen Support

Syntax

  #include <screen.h> 
   
  char *PromptForString (
     scr_t         scr,
     size_t        length,
     size_t        editWidth,
     char         *string,
     int           hasDefaultValue,
     const char   *defaultValue,
     int           linesToProtect,
     void         *promptText );
  

Parameters

scr

(IN) Specifies the screen that receives the prompt.

len

(IN) Specifies the maximum length of the string in the response.

editWidth

(IN) Specifies, in bytes, the width of the display box for the response.

string

(OUT) Points to the user's response to the prompt.

hasDefaultValue

(IN) Specifies whether the prompt has a default value with one of the following:

  • TRUE — The prompt has a default value.
  • FALSE — The prompt does not have a default value.
defaultValue

(IN) Points to the default value. If hasDefaultValue is set to FALSE, this parameter can be NULL.

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.

promptText

(IN) Points to the text contain the question that users must answer with a string.

Return Values

Returns the response string from the user.

Remarks

The PromptForString function is not a NetWare OS function. It is only available from LibC.

See Also