COMM variables are still available in Task functions. They can be used as an alternative to mapping TGDEs to function parameters. The advantage of using COMM variables for inter-function communication is that you do not have to map them. However, the disadvantages of using COMM variables over mapping to TGDEs are:

  • All functions treat them as parameters with ‘Both’ usage. A simple programming typo can cause a COMM variable to be unexpectedly updated. TGDEs used as parameters can go a long way to preventing this type of error.

  • The number, type, and size of COMM variables cannot be altered from the system defaults.

  • There are only a limited number of COMM variables available. If a new COMM variable is wanted in a function, unintended side effects can result. Unless the programmer searches all functions in an application to check that the new COMM variable is not being used, the modified function may alter data and execution flow in other functions.

  • COMM variables do not have programmer-friendly variable names, which TGDEs can be assigned.

Data storage for COMM variables is created when a Task is initialised and is destroyed when the Task terminates. COMM variables persist across member function execution within a single Task, but not across successive Task executions.

Comment on this topic

Topic ID: 540172

 
 
 

Table of Contents

Index

Glossary

-Search-

Back