FUNCTION EDITING
148
Several methods are used when in function definition mode to display and revise
a user-defined function. Also, after a function definition has been closed, the
definition can be reopened and the same methods used for further revisions or
displays. (See Reopening Function Definition in this chapter.)
Displaying a User-Defined Function
Once in function definition mode, part or all of a user-defined function can be
displayed as follows:
To display the entire function, including the function header and the opening
and closing V , enter [o]. APL responds by displaying the function, then wait-
ing for the entry of additional statements.
To display from a specified statement to the end of the function, enter [On],
where n is the specified statement number. APL responds by displaying the
function from statement n to the end of the function, then waiting for the
last statement displayed to be edited (see Editing Sraremenrs in this chapter).
To display only one statement of the function, enter [no], where n is the
statement number to be displayed. APL responds by displaying statement n
and waiting for the statement to be edited (see Ediring Statements in this
chapter).
The following table summarizes function display when in function definition mode:
Entry Result
[no1 Displays statement n
[On1
[ni Displays all statements
Displays all statements from n onward
Revising a User-Defined Function
Statements in a user-defined function can be
replaced, added, inserted, deleted, or
edited as follows:
To replace statement number n, enter [n] and the replacement statement. If
just [n] is entered, APL responds with [n], then waits for the replacement
statement to be entered. If the function header is to be replaced, enter [O]
and the new function header.
To add a statement, enter [n] (n can be any statement number beyond the
last existing statement number) and the new statement. APL will respond
with the next statement number, and additional statements can be entered if
required.
148
Several methods are used when in function definition mode to display and revise
a user-defined function. Also, after a function definition has been closed, the
definition can be reopened and the same methods used for further revisions or
displays. (See Reopening Function Definition in this chapter.)
Displaying a User-Defined Function
Once in function definition mode, part or all of a user-defined function can be
displayed as follows:
To display the entire function, including the function header and the opening
and closing V , enter [o]. APL responds by displaying the function, then wait-
ing for the entry of additional statements.
To display from a specified statement to the end of the function, enter [On],
where n is the specified statement number. APL responds by displaying the
function from statement n to the end of the function, then waiting for the
last statement displayed to be edited (see Editing Sraremenrs in this chapter).
To display only one statement of the function, enter [no], where n is the
statement number to be displayed. APL responds by displaying statement n
and waiting for the statement to be edited (see Ediring Statements in this
chapter).
The following table summarizes function display when in function definition mode:
Entry Result
[no1 Displays statement n
[On1
[ni Displays all statements
Displays all statements from n onward
Revising a User-Defined Function
Statements in a user-defined function can be
replaced, added, inserted, deleted, or
edited as follows:
To replace statement number n, enter [n] and the replacement statement. If
just [n] is entered, APL responds with [n], then waits for the replacement
statement to be entered. If the function header is to be replaced, enter [O]
and the new function header.
To add a statement, enter [n] (n can be any statement number beyond the
last existing statement number) and the new statement. APL will respond
with the next statement number, and additional statements can be entered if
required.