Assign

Key

ALT+=

The Assign function assigns a function to a keystroke, defines a macro, or sets a PWB switch. You can also assign keys and set switches by using the commands in the Options menu. To see the current assignment for a key or the definition of a macro, use Options Keys Assignments or the Tell function (CTRL+T). See: Tell.

Assign

Performs the assignment using the text on the current line. If the line ends with a line continuation, PWB uses the next line, and so on for all continued lines.

Arg Assign (ALT+A ALT+=)

Same as Assign, except uses text starting from the cursor.

Arg textarg Assign (ALT+A textarg ALT+=)

Performs the assignment using the specified textarg.

Arg mark Assign (ALT+A mark ALT+=)

Performs the assignment using the text from the line at the cursor to the specified mark. The mark argument can be either a line number or a previously defined mark name. See: Mark.

Arg boxarg | linearg | streamarg Assign (ALT+A boxarg | linearg | streamarg ALT+=)

Performs the assignment using the selected text. Ignores blank and comment lines.

Returns

TrueAssignment successful.

FalseAssignment invalid.

Example

·To set the Tabstops switch to 8:

1.Execute Arg (ALT+A).

2.Type the following switch assignment:

tabstops:8

3.Execute Assign (ALT+=).

Update

Assign Arg Assign

With PWB 1.x, Assign and Arg Assign do not recognize line continuations. With PWB 2.00, they use all continued lines for the assignment.

Arg streamarg Assign

With PWB 1.x, a streamarg is not allowed. With PWB 2.00, Assign accepts a streamarg.

Arg ? Assign

With PWB 1.x, this form of the Assign function displays the current assignments for all functions, switches, and macros in the “<ASSIGN>Current Assignments and Switch Settings” pseudofile.

With PWB 2.00, the <ASSIGN> pseudofile does not exist; therefore, this form of the Assign function is obsolete. If you use this command or execute a macro that executes this command, PWB issues the error:

Missing ':' in '?'

PWB is expecting an assignment or definition using the name ?, which is a legal macro name.