Hello there
what is the different between %"Init"%; and Init; what does it mean "%....%" ?
Hello there
what is the different between %"Init"%; and Init; what does it mean "%....%" ?
Placing an instruction / procedure call within %% is referred to as "late binding".
It basically creates a "string" rather than the actual instruction and as such it is omitted / ignored during syntax check.
Useful functions is "CallByVar", e.g. % "MySpecialRoutine_" + NumToStr(Num_id, 0) %
...or in cases where you want to be able to load/unload modules without causing syntax errors, for example when you have a dedicated module for each product / part - e.g. %"Production"%;
.... or when you want to have a dedicated setup / calibration module which you don't want to leave loaded to prevent the customer from running it by "mistake".
Very good explanation by SAABoholic, I can't think of anything more to add.
do i have to load always the programs when i use this addtion ?
The purpose of late binding is that you don't have to load the program immediately. Sometimes you won't load the program until you need it, but you want to have the code written that will call the routine after it is loaded. Late binding doesn't check that the called routine exists until it executes the line of code.