I wonder if there is a way of doing indirect jumping in S7.
This is what i would like to do....
Now i was hoping i could do something like
CALL Ptr, instead of CALL FC 2
And by changing the number for FC in the pointer, be able to call for different FC's.
I can ofcource use some kind of jump table
if x=1 then call FC 2
if x=2 then call FC 3
But i think it would be a nice way of calling different FC's just by passing a FC-number to some FC and the call for that FC was made.
Is there a way of doing this in S7.
Best Regards
Pethoek
This is what i would like to do....
Code:
LAR1 P##Ptr // Pointer addr
L W#16#1018 // FC - Type
L W [AR1,P#0.0]
L W#16#0
T W [AR1,P#2.0] // Word 2 = 0
T W [AR1,P#4.0] // Word 4 = 0
T W [AR1,P#6.0] // Word 6 = 0
L W#16#2 // FC 2
T W [AR1,P#8.0] // FC Number
CALL Ptr, instead of CALL FC 2
And by changing the number for FC in the pointer, be able to call for different FC's.
I can ofcource use some kind of jump table
if x=1 then call FC 2
if x=2 then call FC 3
But i think it would be a nice way of calling different FC's just by passing a FC-number to some FC and the call for that FC was made.
Is there a way of doing this in S7.
Best Regards
Pethoek
Last edited: