I - Insert

Causes the Editor to enter the input environment.

Syntax

I
or
I{ data}

Two Input Modes

The I command has two different modes: Insert and Input.

Insert Mode

When you use the I mode, you are prompted by a line number.

All subsequent lines you type are then considered as data input to the item.

You cannot type more than 240 characters on one line without typing a line continuation character. The line continuation character is a segment mark (X'FF'), entered by typing CTRL+_.

If the I command is issued for a new item, the new lines are inserted starting at line one. The Editor defines data lines by prompting with a line number to which data are to be entered. Line numbers for new items are issued consecutively, beginning with 001.

Input is prompted with the line number followed by a plus sign indicating lines are being added after the line number indicated. The exception to this is when a line is inserted before the first line of the item. The prompt in this case is 001-.

A null input (ENTER, LINE FEED or RETURN in column one) terminates Editor prompts, and exits the input environment, waiting for the next Editor command.

When you exit the input environment for the first time for a new item, the Editor executes an automatic F (Flip) command, toggling the Editor buffers and allowing the newly entered lines to be listed.

Input Mode

To use Input mode, you include the data you want to input on the same line as the I command. You are limited to inserting one line of up to 240 characters. Line continuation is not allowed with this form of the command.

Creating Empty Lines (Null Attributes)

If a null line is required in the item, you must create the line with a fill character and then replace that fill character with a null character by means of the R (Replace) command.

Inserting Data into an Existing Item

If the I command is issued for an item already containing data, new lines are inserted following the current line. If the line pointer is at the top of the item, input lines are inserted before the first line of the item.

Example 1

:EDIT AFILE AITEM
NEW ITEM
Top
.I
001 INPUT
002 DATA
003 return
Top
.L2
001 INPUT
002 DATA
EOI 002

Edit a new item.


Insert command.
Data is keyed into the item.


Input is terminated. The F command executes automatically.
List command.

Example 2

:ED MD TESTX
NEW ITEM
Top

Create an item in input mode.

.I THIS IS^A TEST^OF THE^REALITY EDITOR'S^INPUT MODE^LET'S^SEE WHAT IT^CAN DO

 

Top
.F
Top
.P
001 THIS IS
002 A TEST
003 OF THE
004 REALITY EDITOR'S
005 INPUT MODE
006 LET'S
007 SEE WHAT IT
008 CAN DO
EOI 008
.FI
'TESTX' filed in file 'MD'.

Note that each caret mark is the echo of pressing
CTRL+^.

Display the item in standard Editor format.

Example 3

:EDIT TESTFILE TESTITEM
Top
.L99
001 LINE 1
002 LINE 2
003 LINE 3
EOI 003
.T
Top
.I
001-NEW LINE A
001-RETURN
.G2
002 LINE 2
.I
002+NEW LINE B
002+RETURN
.F
Top
.L99
001 NEW LINE A
002 LINE 1
003 LINE 2
004 NEW LINE B
005 LINE 3
EOI 005.




Current contents of TESTITEM.



Top of item command.

Insert a new line.
New line input.
Input terminated.
Go to line 2 of the item.

Insert new data after line 2.
New line input.
Input terminated.
F command toggles buffers.

List command.