Advanced Main
Advanced Main
less than a minute
Each program requires a entry point, this is where your execution begins. In a new program this is called per default the main function.
Per default the first thing the main executes is the constructor, done to initialize the program. In the main you can add function blocks, to create a program or call a method of sub program.
A new program contains at least one method, for this case per default the run method. In the main you can execute this method with the
create function block, in here you set a variable t to your program testSub.prog. With the call function block you can set instance to t or this and select the run method. This wil execute the run methods in the main function.