show()

Purpose

General function for displaying data in a field

Syntax

void show(mapnr, fieldnr, data, dtype, size, flags)

Parameters

int mapnr

Number of map containing field

 

int fieldnr

Number of field to display data

 

ANY* data

Data to be displayed

 

int dtype

Data type of the data to be displayed

 

int size

internal size of data to be displayed

 

int flags

Parameter specifying display format

 

The parameter flags may take any combination of the following values

 

Value

Meaning

 

DEFAULT

The data will be formatted using the flags set in MAPEDIT. This is the preferred method of controlling display formats. If no format flags were set in MAPEDIT, the user preferences are used.

 

BLANK_IF_ZERO

The field is left blank if the data has a value of zero

 

LEFT_JUSTIFY

This left justifies the data displayed in the field

 

RIGHT_JUSTIFY

This right justifies the data displayed in the field

 

FILL_WITH_ASTERISK

This places asterisks (*) in the part of the field that is not displaying data

 

NO_LEADING_ZEROS

This suppresses zeros from the front of numeric data

 

LEADING_ZEROS

This adds zeros to the front of numeric data

 

TRAILING_MINUS

This places a negative sign(−) at the end of negative numbers

 

IN_PARENTHESIS

This places brackets ( ) around negative numbers

 

WITH_COMMAS

This places commas (,) between every three digits of numeric data

 

LONG_YEAR

This displays the year in dates in full, for example 1998 instead of 98

 

YEAR_FIRST

This displays dates with the year first

 

MONTH_FIRST

This displays dates with the month first

 

MONTH_NAME

This displays dates with the month in words. The words used are those set in the user preferences

 

NO_SEPARATOR

This displays dates without any separating character (such as /) between day, month and year

 

SHOW_SECONDS

This includes seconds when times are displayed

 

SHOW_HUNDREDTHS

This includes hundredths of seconds when times are displayed

Description

This function is a generalised version of the show_x() functions. It caters for all datatypes.

The data is assumed to be of the type specified by the parameter dtype and of the size specified by the parameter size. The size is the internal storage size, not the display size.

This function is generally used in advanced applications.

See also

show_x()

Example

/* to display one integer */
show(2,6,&orderline.quantity,sizeof(int),'I',DEFAULT);
/* to display a field of multiple occurs 4 */
show(2,6,&orderline.quantity,'I',4 * sizeof(int),DEFAULT);