DebugN()
Evaluates any Control expressions and writes the result to stderr, followed by a new line.
Synopsis
int DebugN(expression[, expression[, ...]]);
Parameters
Parameter | Meaning |
---|---|
expression | Control function to be evaluated. |
Return Value
In the event of an error -1, otherwise 0.
Errors
Missing arguments
Description
Any Control expressions can be evaluated with the DebugN() function as with Debug(). The result is output to the terminal from which the calling UI manager or Control manager was started. Any number of arguments, separated by commas, can be processed, with each argument being output between square brackets '[ ]'. In contrast to Debug(), the function sets a new line after output of all the arguments.
You can suppress "DebugN()"; entries that are still found in the scripts for the appropriate Manager with an entry "ignoreDebug = 1"; in the config file under [general], [ctrl], [ui] or [event]. If no entry is added to the config file, the DebugN()s are still output.
The _LINE_ constant can be used for outputting the current line number of the script.
This constant is replaced by an integer constant in each script that contains the
value of the current line number (e.g. DebugN("Zeile:"
,
__LINE__);).
The format in which the DebugN()s are output may vary for different WinCC OA versions. The function is used for troubleshooting in Control scripts!
Example
main()
{
int erg;
erg=23;
DebugN("result : ",e);
}
Assignment
Availability
UI, CTRL