dpGetFormat()

This function returns the "format" of a data point.

Synopsis

langString dpGetFormat(string dp);

Parameter

Parameter Description
dp Data point element

Return Value

The return value is a string that contains the format (for example, "%6.2f") in one or several languages. In the event of an error an empty string is returned.

Errors

The errors can be retrieved with getLastError(). This includes missing arguments or when the data point does not exist.

Description

The format can be retrieved with the CTRL function dpGetFormat(). dpGetFormat(): If no specification exists on the DPE (i.e. no description because this specifications are coded in the description), corresponding values from the master data point are applied to the DPE.

Example


main()
{
  langString form;
  form=dpGetFormat("integer_1.");
  DebugN(form);
}

The formatting strings are also used in the sprintf function. For more different examples of the format string, see chapter sprintf().

Assignment

Data point function

Availability

UI, CTRL