PromptForUnsignedNumber

Sends a prompt for a number to the specified screen.

Library:LibC
Classification:NetWare OS
Service:Screen Support

Syntax

  #include <screen.h> 
   
  int PromptForUnsignedNumber (
     scr_t         scrID,
     uint32_t     *result,
     uint32_t      minValue,
     uint32_t      maxValue,
     int           base,
     int           linesToProtect,
     uint8_t       hasDefaultValue,
     uint32_t      defaultValue,
     const char   *promptText, 
     ... );
  

Parameters

scrID

(IN) Specifies the screen that receives the prompt.

result

(OUT) Points to the value that the user entered.

minValue

(IN) Specifies the minimum value.

maxValue

(IN) Specifies the maximum value.

base

(IN) Specifies the type of number:

  • 10 = decimal
  • 16 = hexadecimal
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.

hasDefaultValue

(IN) Specifies whether a default value exists:

  • TRUE — a default value exists
  • FALSE — a default value does not exist
defaultValue

(IN) Specifies the default value for this prompt.

promptText

(IN) Points to the text that contains a question that the user must answer with a number.

...

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

Return Values

If successful, returns 0.

See Also