• Aucun résultat trouvé

The COMMAND Command

Dans le document rn} GOULD (Page 187-193)

Figure 2-5. Default Memory Allocation for Overlays

5.6.6 The COMMAND Command

(/

5.6.6 The COMMAND Command

The COMMAND command is used to display the user's last four Edit commands as they

were seen by the Editor. .

Syntax:

COMMAND Response:

The last four commands entered into the Editor are displayed. This could be useful in determining a problem with a file. Possibly what you typed in as an instruction wasn't what you really wanted done.

Example:

EDT> COM

F,L

DEL 3/7 APP9 COM EDT>

If less than four commands were issued to the Editor, only those issued are displayed.

5-21

'.6.7 The COPY Command

The COpy command is used to copy existing lines of text to the work file, beginning at the specified line number. The lines to copy can be on the work file already or they can come from a file saved or stored previously.

To select specific lines from a file, the file must be saved or stored with line numbers. If the whole file is to be copied, a lack of line numbers makes no difference.

The lines from which text are copied are not deleted. To delete lines in one part of a workfile and copy them to a different part, use the MOVE command.

Files that have not been built in the Editor or accessed and saved previously via Editor USE and SAVE or STORE commands cannot be copied directly into a workfile.

To do so, save the current contents of the workfile, then access the desired file with the USE command. USE attaches line numbers in a form acceptable to the EDT. (See Section '.4.2.3.)

Save or store the file back on disc, then copy the original file back into the workfile.

The file can now be copied into the workfile.

Syntax:

where:

group

COpy [group] (FROM][filenameJ (TO lineno] (BY increment] [LIST]

is a line number, a range of lines, or a group of ranges and/or lines to copy into the workfile from another file or from within the workfile itself. Lines to be copied can be further identified by content. (See Section '.4.1.) If copying from a file other than the current workfile, the name of the file must be supplied with FROM.

ii nothing is specified for group, aU lines in the fHe are copied.

FROM filename specifies the name of a file from which lines are to be copied. This file must belong to the same user who issues the command.

TO lineno

If a file name is not specified, the current workfile is the default.

is the line number in the workfile at which copying is to begin. The least significant digit in the specified line number determines the line numbers the Editor generates for the text being copied. (See Section '.4.2.1.) The line number you specify must not currently exist (must not have been used before or must have been previously deleted).

Copying stops if the Editor generates a line number that already exists.

r(---'

~/

('

line following the last line in the workfile. If collecting at end of file, line numbers for copied text will reflect the least significant position and increment of the DELTA value for line numbers. See the SET line number. The increment value can be any number starting at .001.

Example: If O. is specified as a beginning line for copying and .05 is specified with BY, line numbers generated for copied text are .00, .05, .10, .15, .20, etc.

The default increment is 1., .1, .01, or .001, depending on the least significant digit used in the line number specification.

For further description of increments, see Section 5.4.2.1.

specifies that lines be displayed as they are copied. It is helpful if you have to break out of a copy operation.

Lines are copied into the workfile as specified.

If lines are coming from a file other than the workfile, the name of the file and the .

2. position, therefore only the line numbers to be copied needed to be specified.

In this example, text from an existing file was copied to the workfile so both the file name (BAT) and the line numbers to be copied had to be specified.

In this example, text was copied from several positions in the workfile to one position. To do this, the 'TO' parameter must be specified before the group it can. It then displays the line number on the file being accessed where copying stopped with the message:

lineno NOT PROCESSED.

Use COPY again with a TO specification that has a beginning line number (and/or TO increment) that generates enough new lines to accommodate the text that still must be copied. (See Section 5.4.2.1 and the TO and BY descriptions under Syntax.) Start copying again at the line number displayed above.

If a file is specified for COpy and it is PO (Password Only) protected, the password is required to read it. The prompt:

ENTER PASSWORD

is displayed. Enter the valid password followed by a carriage return. If the password is not valid, the COPY command terminates.

5-25

5.6.8 ~ DE8UG Command

The DEBUG command is used to exit from the Editor and generate memory dumps. This command was introduced for internal use only to aid in development and debugging of the Editor.

As a result, the keyword DEBUG is reserved and cannot be used as a file name.

Syntax:

DEBUG

5.6.9 The DELETE Command

The DELETE command is used to delete lines of text from the work file.

Syntax:

where:

group

DELETE (group] [LIST]

is a line number, a range of lines, or a group of ranges and/or lines to be deleted. Lines to be deleted can be further identified by content. (See Section 5.4.1.)

If not used, the last range specified in the previous command is deleted by default.

LIST specifies that lines be displayed as they are deleted.

Response:

The specified lines are deleted from the workfiie. The Break key can be used to stop deletions. (See Section 5.4.7.)

Example:

Errors:

EDT> DEL 15/20 EDT> 13/22 13. text 14. text 21. text 22. text EDT>

(

Dans le document rn} GOULD (Page 187-193)

Documents relatifs