• Aucun résultat trouvé

Entering Text and Commands in Page Mode

Dans le document Reference Manual (Page 36-41)

1-14

A whole page of text is transmitted to CA...',iDE when the cursor is placed at home position (the upper left-hand corner of the screen) or at the end of the last line of text on the page and the X1.lIT (transmit) key is pressed. NEXT must always be the first token on the screen for text to be transmitted in page mode. \Vhen a page is transmitted that does not contain any CA_,\DE conmlands other than VOID, a new page is displayed that begins \vith the last line transmitted. \Vhen the DHT key is pressed, C.,.'\ .. ~DE

receives everything between the home position and the cursor if the cursor is not at home position.

The setting of\VRAP.':\.ROU~D, which can be checked and modified by the TER1IIKAL command, affects how lines of text are ended. If \VRAP AROUND is set to FALSE, each line of text ends \vith a carriage return and linefeed so the text can be displayed on the screen properly. If \VRAP AROUND is set to TRUE, the terminal automatically does a linefeed and carriage return.

Records must be transmitted in sequential order or a sequence error is flagged and record processing stops. The following message is given when the end of the file or the end of the sequence range requested by a page-invoking command has been reached:

#DISPLAY COMPLETE

Records can be inserted between the records given by Ck,\DE. The sequence field can be left blank if a record prior to these inserted lines has a sequence number. CAJ.~DE

calculates the sequence numbers for these inserted lines, and the largest sequence increment allowing all records to be numbered is assigned. The increments considered

8600 1500-000

General Inf.ormation

are 100. 50. :20. 10. 5. 2. and 1. If the records do not fit when the minimum increment of 1 is used. a mes·sage is displayed. l' nder certain conditions. an error message might be displayed although there is sufficient room for t.he inserted lines. Refer to the examples later in this section for an explanation of how this can occur.

Resequencing may be done on records with existent sequence numbers so that all records can be assigned a sequence number. Sequence nunlbers can be entered manually if the nunlbers are lined up \vith the existing sequence numbers; the leading zeros can be replaced by blanks if desired. For example, if b signifies a blank space, 00000100 can be typed as bbbbblOO. unnlill1bered blank lines transmitted at the bottom of the page are ignored. HO\vever, if blank lines are desired at the bottom of the page, a sequence number or a command must be typed on the last of the blank lines.

Any valid CAl'JDE comnland can begin in the first collill1.l1 of any line within the currently displayed page. However, transmitting any cOffill1ands, except the five page-invoking cOffill1ands and the VOID command, interrupts page mode. Cili'JDE processes page mode input record by record lmtil a nonpage mode comnland other than VOID is found.

At this point CANDE processes the remaining text on the screen as a cOmh1and or string of commands separated by semicolons or carriage returns. If a CANDE command followed by additional page mode text is transmitted, an error message is given. The cursor should be located immediately after the command when it is transmitted.

To return to page mode after processing commands other than VOID or a page mode cOffill1and, one of the page-invoking cOffill1ands must be used. C.Al~DE keeps track of the most recently displayed page of text as a location in the work file. \\Then page mode is temporarily interrupted to process a nonpage-invoking cOffill1and, the page-invoking commands can be used to return to page mode at that displayed page (SA1fE) or near it (NEXT, PAGE, + or -). CANDE maintains the current (or most recently) displayed page after the execution of all other CANDE cOffill1ands, with the exception of one group.

This group consists of the follo'NIDg commands, other than SAVE, that finalize the state of the work file: REMOVE, GET, :MAKE, RECOVER, 1ICS, BYE, and HELLO.

The asterisk (*) form of the FIX command and the at sign (@) form of the MARGIN command cannot be used within numbered lines while in page mode. (This differs from single-line sequencing mode.)

Page mode input is processed only when the next UPDATE, LIST, or any page-invoking command is entered. Because of this, an error message may not be displayed at the time page mode input is transmitted.

Examples

In the following example (an ALGOL file), the XMIT key should be pressed when the cursor is in the last column of line 2400. Line 200 is deleted and a new page that begins with the sequence number 2400 is displayed. .

General Information

1-16

NEXT+ .... * .... 1 .... * .. · . * .... 6 •••• * .... 7 ••

00000100 ABC

V0000200DEF <This line will be deleted.>

00000300 GHI

00002400 JKL

In the following example, the FI)J"D command is executed after lines 100-300 are processed, if the cursor foUo\'\'S the FIND command when XMIT is pressed:

NEXT+ .... * .... 1 .... * .. · . * .... 6 •••• * .... 7 ••

00000100 ABC

V0000200DEF <This line \'.;ill be deleted.>

00000300 GHI

FIND LIT !ABC/ :TEXT

The delay between transmitting a command and receiving an error message about that conm1and is detnonstrated in the following exanlple:

NEXT+ .... * .... 1 .... * ..

Upon the next UPDATE, LIST, or page-invoking command, the following error message is given:

#CANNOT SEQUENCE WITHIN BOUNDS AT LINE 5

Notice that LINE 5 refers to the fifth line transmitted, the line v-tith NEXT being the

first line transmitted. .

The follo\ving example demonstrates how using a non-page-mode command (DELETE, in this example) while in page mode, and then entering unsequenced lines before using a page-invoking command to return to page mode, can cause CANDE to calculate sequence numbers incorrectly (the file type shown is ALGOL).

The PAGE command, entered on page 1 of the terminal, returns the follO\ving screen:

NEXT+ .... * .... 1 .... * .... 2 .... *

General Information

After mo\-ing to page 2 of the terminal. the following command is entered:

DELETE 12

Then. moving back to page 1 of the terminal. the follo\\ing screen is transmitted when you attempt to enter three unsequenced lines between lines 10 and 14, \vithout first entering a p'lge-invoking command (PAGE or S.A ... \lE) to return to page mode:

NEXT+ .... * .... 1 .... * .... 2 .... * 00000005 ABC

00000010 DEF XXX yyy ZZZ

<XMIT from here>

CA_~DE returns the error message:

#CANNOT SEQUENCE WITHIN BOUNDS AT LINE 4, LAST VALID SEQUENCE=10

..•. 6 .••• * .... 7 •.

Even though line 12 was deleted, since no page-invoking command was subsequently entered, the page mode tables were not updated with the deletion. Therefore, CAl'JDE attempted to place the new W1sequenced lines between line 10 and the next known line, which it had saved internally as line 12. The sequence error message was generated because Cfu~DE could not fit three W1sequenced lines between lines 10 and 12.

Note: If a command is included in the transmission (after the page-mode input), there could be a delay between transmitting the screen and receiving an error message. This is illustrated in a previous example.

If PAGE or SAME had been entered upon returning to page 1 of the terminal, the page mode tables would have been correctly updated \vith the deletion, and there would have been sufficient room for the new lines .

1-18 8600 1500-000

Section 2

Dans le document Reference Manual (Page 36-41)