CALL (BASIC Procedures) Statement Details Syntax CALL name[(argumentlist)] Argument Description name The name, limited to 40 characters, of the BASIC SUB being called. The name must appear in a SUB statement if the SUB is in the same module. argumentlist The variables or constants passed to the subprogram. Arguments in the list are separated by commas. Arguments passed by reference can be changed by the subprogram. If the argumentlist includes an array argument, the array is specified by the array name followed by empty parentheses: DIM IntArray(1 TO 20) . . . CALL ShellSort(IntArray()) When you use the CALL statement, the CALL keyword is optional. However, if you omit the CALL keyword, you must declare the procedure in a DECLARE statement. Notice also that when you omit the CALL keyword, you also omit the parentheses around the argument list. Arguments are passed by reference: the subprogram is given the address of the argument. This allows subprograms to change the argument values. BASIC can also pass arguments by value. The following statement calls a subprogram and passes a single argument by value: CALL SolvePuzzle((StartValue)) Because StartValue is in parentheses, BASIC evaluates it as an expression. The result is stored in a temporary location, and the address of the temporary location is passed to the SUB. Any change made by the subprogram SolvePuzzle is made only to the temporary location and not to the variable.