dpNameCheck()

This function should not be used anymore and was replaced by the function nameCheck(). Checks, whether the name of a data point contains only the following characters: 0...9, A...Z, _, a...z.

Synopsis

bool dpNameCheck(string dpName);

Parameters

Parameter Meaning
dpName Name of the data point

Return Value

TRUE, FALSE, correct name.

Errors

Description

Checks, whether the name of a data point only contains the following characters: 0...9, A...Z, _, a...z. The function also checks multibyte characters. The function returns TRUE if the data point name does not contain any forbidden characters and FALSE if it does. The correct data point name is returned in the dpName parameter.

Forbidden characters for datapoint names are: dot ".", colon ":", semicolon ";", comma ",", right or left square brackets "[ ]", right or left curly brackets "{ }", blanks, tabulator "/t", question mark "?", asterisk "*", backslash "\", slash "/", percent sign "%", callsign "!", right or left brackets "( )" dollar symbol "$", the commercial at symbol "@", quotation marks "", single quotation marks '

Example

The example checks if the name of the data point in the text field is correct. It also writes the corrected data point name into the text field after a delay.

main()
{
  string dpName1 ="/Data point1%";
  DebugN("Data point name:", dpName1);
  TEXT_FIELD1.text = dpName1;
  bool i = dpNameCheck(dpName1);
  if(i == 1)
  DebugN("The data point name does not contain any illegal
  characters:", dpName1);
  else
  {
    DebugN("The data point name contains illegal characters");
    DebugN("Corrected name: ", dpName1);
    delay(3,30);
    TEXT_FIELD1.text = dpName1;
  }
}

Assignment

Data point function

Availability

CTRL