field_help()

Purpose

Shows help message of a field (new version)

Old name

#define help_message(mapnr,fieldnr) field_help(mapnr,fieldnr,0)

#define help_text field_help

Syntax

void field_help(mapnr, fieldnr, flags)

Parameters

int mapnr

Number of map containing field

 

int fieldnr

Number of field owning help message

 

int flags

Parameter specifying action to be taken

 

The value of the flags can be any combination of the following:

 

HT_CLEAR

This is used with HT_PAUSE. It clears the map after the user presses a key

 

HT_PAUSE

This is used to force the user to acknowledge the help message

Description

The field_help() function displays the help message of the field passed. Many of the DP4 utility programs now use this procedure to display their help messages below the main map.

Example

/* how a program can display its help message */
#include "dp4.h"
void process()
{
map_load("MYPROG");
trm_read_user();
if (tail_get_option("HELP",FALSE))
{
map_datamap(100);
/* programs help message is constructed as the
help message of field 1 of map 100 */
field_help(100,1,HT_PAUSE);
return;
}
...
}