qb45advr.hlp (Topic list)
Important Notice
The pages on this site contain documentation for very old MS-DOS software, purely for historical purposes. If you're looking for up-to-date documentation, particularly for programming, you should not rely on the information found here, as it will be woefully out of date.
Argument Passing Conventions
  Modules and Procedures   Passing Arguments   Contents   Index
──────────────────────────────────────────────────────────────────────────────
Passing by Reference and Passing by Value
 
BASIC uses two different ways of passing arguments to a procedure.
 
The phrase "passing by reference," used with SUB and FUNCTION procedures,
means the address of each argument is passed to the procedure by placing
the address on the stack.
 
The phrase "passing by value," used in DEF FN functions, indicates that the
value of the argument is placed on the stack, rather than the address.
Because the procedure does not have access to the variable when an argument
is passed by value, the procedure cannot change the variable's value.