ATEasy does not allow you to call program procedures directly from the system or a driver as that would make them dependent on specifc programs. Doing so will generate a compiler error. Only one Program module can be active at any time, and it is possible that a procedure defined in one program module would not exist in another module. ATEasy would not be able to resolve this procedure call from the Driver or System module.
The following procedure shows how to call a program procedure from the System or Driver module.
In ATEasy you can call program procedures using procedure variables. For example: If you pass a procedure as an argument to a system procedure, that system can call the program procedure using a procedure variable as shown here:
In the program Program create your procedure ( called 'a' in this example):
Procedure a()
{
!Place procedure code here
}
Create a public System (or a Driver) procedure variable (called m_procA in this example) and at the beginning of your application assign it to Procedure a, as shown below:
Program.OnInit()
{
system.m_procA=a
}
In the system the program procedure can be called as follows:
m_procA()