Hi Arnaud;
I do this all the time in my frameworks and have for years (OK, decades - LOL)! As you have probably found in the function painter though, using another global function as an argument results in an error(s).
Sooooooo .... The trick here is to use an NVUO as a function-to-function broker.
Design:
Function #1 => NVUO => Function #2 => NVUO => Function #3 => NVUO => Function #NN
Here is a real simple example: my simple test code of F#1 => NVUO = F#2. Where F1 sets the calling parameter to 2 and F#2 computes its argument from F#1 to return argument * 100.
Test Call: MessageBox ("Func-2-func Test" , String ( fn_one ( 2 ) ) )
Fn_one Code:
Int li_num
nc_broker lo_broker
lo_broker = CREATE nc_broker
li_num = lo_broker.of_func2 (ai_num )
Destroy lo_broker
Return li_num
NVUO Code:
Int li_num
li_num = fn_two ( ai_number )
Return li_num
Fn_two Code:
Int li_num
li_num = ai_num * 100
Return li_num
Using this approach, even F1 could call a succession of functions F2,F3,F4 etc in a row using the NVUO as the function to function broker. In fact, what have here is an MVC design - just like we see in PB2019's new "C# Web API". Add in recursion, and the NVUO can even broker into itself to call a slew of other GF's in one thread. OK, maybe that's a bit too much for the synapse connections for the moment (working on 5 cups plus of coffee now ... whee).
On yeah .. the test result ...
Now with a little more "creative" design and programming, you can make the NVUO "broker" handle "dynamic" routing to any other GF(s) on-the-fly vs my hard coded example above. ;-)
Food for thought.
HTH
Regards ... Chris
Example:
If Not gnv_app.IsLicenseActive Then
Would cause the 'getter' function to run which would be some code to determine if the program license is active.