Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

Using Comments for Debugging Functions

  • Last UpdatedJul 18, 2023
  • 1 minute read

You can use comments to help with the debugging of your functions. You can use comments to temporarily have the compiler ignore blocks of statements by changing them to comments. C style and C++ style comments can be nested, for example.

FUNCTION

IncCounter ( )

IF COUNTER < 100 THEN

COUNTER = COUNTER + 1 ;

/* ELSE // Comment about statement

COUNTER = 0; // Another comment

*/

END

END

The complete ELSE condition of the IF conditional executor will be ignored (and not execute) so long as the block comment markers are used in this example.

Note: The inline ( // ) comments have no effect within the block ( /* and */ ) comments (as the whole section is now one big comment), and should remain unchanged, so that when you do remove the block comments, the inline comments will become effective again.

See Also

Writing Functions

Related Links
TitleResults for “How to create a CRG?”Also Available in