Scadabasic:program("FUNCTION"...)

2 Posts
2 Users
0 Likes
18 Views
w.qin
(@w-qinarcinfo-com)
Posts: 21
Eminent Member
Topic starter
 

Hello ,
program("FUNCTION", ProgName, Branch, Function);
I want to know "Branch" in this instruction.
Does it same like annimation-run-program 's branch?
It doesn't work on my side. the return value show program not loaded.
So I add "preload" before"function" : program("PRELOAD", ProgName, Branch);
Seems still not right.
Use print in that function ,shows branch=""

If I want to run a function of another program and with branch, is there any simple way?

Thank you~

 
Posted : 22/05/2018 9:38 am
n.kunzer
(@n-kunzerarcinfo-com)
Posts: 1236
Member Moderator
 

Hi Wen Qin

That's a trap!
The branch field parameter will execute the function of the program THAT IS LOADED WITH THIS BRANCH.

Yes, a program can be loaded with a branch (F9 box -> Branch field under the program combo).

To execute a function with a branch the best is to pass it as an argument.
Then, in the function, you start by this line: Tree(GETARG("ARG1"));

nico

 
Posted : 22/05/2018 9:46 am