IOyesNo2

Top  Previous  Next

If a "Yes and no question generates ""and delivers input back.

This function generates from the handed over announcement number and announcement name and the default for the positive answer (WORLDWIDE 1) and for the negative answer (WORLDWIDE 2) a question which is to be answered by one of these both possibilities. Besides, it is enough to give the first significant signs. If the input is not unequivocal or not one of both default, appears a suitable tip (WORLDWIDE 4) and the question is put once more.

To permit an answer with the Digitalisiercursor, #L is understood as a no and #P as Yes.

With suitable configuration the queries are formulated as a dialogue.

Parametre

root (PROOT) [IN]

Act on the open data bank.

proc (const char *) [IN]

Name of the announcement from the announcement file which should be spent as a question.

num (int) [IN]

Number of the announcement from the announcement file which should be used.

dflt (int) [IN]

This value specifies the Defaultantwort. If the user answers only by pressure of the <RETURN >key so becomes this value zurückgeliefert. This value should be from the data area of the return values {0, 1}, however, can have also another value (e.g., 2), because he is not checked by the function.

helpID (const char *) [IN]

Name of the accompanying help subject in the Moskito's help if the subject does not stand in user.hlp ""is used as a syntax "Datei|Thema". Here ZERO can be put down if no help should be used.

Result

(int) [OUT]

1 positive answer ""elective

0 negative answer ""elective

Remarks

If with setEcho (), or „echo / of DIALOGUE“, to dialogue-based user interface is switched the queries appear message boxing.

Declaration

#include "system.h"

 

int DLLENTRY IOyesNo2 (

PROOT root,

char * proc,

int num,

int dflt,

const char * helpID

);

Example

status = IOyesNo2 (root, "STRAESSLE compatibly?", 1, ZERO)

Of the variables "status" becomes the Return value of the function IOyesNo2 assigned, she asks whether a certain function compatibly to the GRADIS of the company STRAESSLE should run off. If this question presses only by of the <RETURN >key answered, the function delivers the value "1" back what corresponds to the negative answer.

Remarks

The file MELDUNG.DAT contain among other things the following lines which can be adapted when required:

--- WORLDWIDE 1

Yes

--- WORLDWIDE 2

No

--- WORLDWIDE 9

Yes

--- WORLDWIDE 10

No

--- WORLDWIDE 3

Demolition