In file prompts.h:

char* msg_getunitl

(int num, int value, int language)

Get the name of a unit.

Documentation

Get the name of a unit.

This function is similar to msg_getl(), with a catch: it retrieves either of two messages, based on the value of a variable. The function is used to format a unit's singular or plural form based on a value. For instance, you wouldn't want to say `1 Kbytes', and `1 Kbyte(s)' is an ugly way to avoid the problem. This function solves the problem.

The way to do it is to define two little prompt blocks. The first holds the word `Kbyte', the second the word `Kbytes'. Your module uses this function to access the needed form of the unit and includes it in a message given to the user. Needless to say, this function can be used for anything that needs dual, value-selected prompting. User sexes are just one example.

Parameters:
num - The prompt index. You will want to use the symbolic name here.
value - The value mentioned above. If value is anything but one, num will be increased by one.
- language The language of the retrieved unit name.
Returns:
A null terminated string pointer to the prompt.

Alphabetic index



This page was generated with the help of DOC++.