CALL Statement
◄Contents► ◄Index► ◄Back►
──────────────────────────────────────────────────────────────────────────────
Transfers control to a SUB procedure.
[CALL] name [([argumentlist])]
■ name The name of the SUB procedure to call.
■ argumentlist The variables or constants to pass to the SUB
procedure. Separate multiple arguments with commas.
Specify array arguments with the array name followed
by empty parentheses.
■ If you omit the CALL keyword, also omit the parentheses around
argumentlist. Either declare the procedure in a DECLARE statement
before calling it, or save the program and QBasic automatically
generates a DECLARE statement.
■ To specify an argument whose value will not be changed by the
procedure, enclose the argument in parentheses.
Example:
The program REMLINE.BAS illustrates calling SUB procedures. To view or
run this program, load REMLINE.BAS using the Open command from the File
menu.
See Also ◄CALL ABSOLUTE► ◄DECLARE► ◄SUB►