dpGetFormat()

This function returns the "format" of a datapoint.

Synopsis

langString dpGetFormat(string dp);

Parameter

Parameter Description
dp Datapoint 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 datapoint 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 datapoint 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

Datapoint function

Availability

UI, CTRL