Indirect Parameter Passing

Prev Next

Introduction

Some functions which only use input parameters support indirect parameter passing where instead of providing the function parameters directly, the function parameters are put into a set and then pass as one single function parameter instead.

In the function descriptions, the support for indirect parameter passing is described under the item Restrictions where you find a statement where indirect parameter passing is either enabled or disabled.

In general indirect parameter passing is not enabled whenever the functions include output parameters, input/output parameters, references and/or code pieces. Indirect parameter passing is also not allowed for control flow functions and user-defined functions.

       table create( table 1, table 2 ); // The direct way

       indirect[]= { table 1, table 2 }; // The indirect way
       table create( indirect[] );
       echo("Created two tables in both cases" );
Created two tables in both cases
Try it yourself: Open LAN_Features_Indirect_parameter_passing.b4p in B4P_Examples.zip. Decompress before use.