TL)
The DESL Editor
DESL contains a source (text) editor to allow interactive modification of ASCII character strings/files at various junctures within a DESL session.
The opportunities for text editing come at the time of issuance of the "use", "read", "reads" global options. Also, use of the "tabfile" and "eqfile" eqn function options will allow editing to occur. The default editor can be set to other than the internal DESL editor via the editor command. Current list of choices other than the internal editor is :
The DESL source editor is a line editor. The prompt which appears when the editor is in control is EDIT(#1/#2)>, where #1 is the line currently being pointed to and #2 is the total number of lines.
The set of editor commands are completely independent of the set of DESL commands. The editor commands, abbreviations and their definitions are shown in the following table :
| DESL Editor Command (abbreviation) | Command Definitions |
|---|---|
| @ | Positions line pointer at named line number |
| . | Repeats last command |
| .. | Advances pointer one line and repeats last command |
| # | Moves line pointer # lines forward ( positive # ), or backward (negative #) from current line |
| abort (!) | Ends edit of file leaving original file intact |
| add (a) | Adds a string to one or more lines |
| bc | Sets blanking character for "modify" edit command ( default blanking character is ampersand, & ) |
| bottom (b) | Moves line pointer to last line of file |
| brief (br) | Turns off trace printing |
| change (c) | Exchanges string1 for string2 for indicated number of occurrences of string1 |
| clrclip (cc) | Clears the clipboard |
| copy (co) | Copies a named/implied span of lines to a clip file. Original lines left in file. |
| cut (cu) | Removes named/implied span of lines from file. Optionally saves cut lines on clip file. |
| dc | Sets deleting character for "modify" edit command. ( default deleting character is pound sign, # ) |
| delete (d) | Removes named/implied span of lines from file |
| end (e) | Ends edit of file with all file changes incorporated in the file being edited. |
| ic | Sets inserting character for "modify" edit command. ( default inserting character is the circumflex sign, ^) |
| input | Specifies an alternate file from which to pull editing commands until EOF or "e(nd)" |
| insert (i) | Allows insertion of lines from keyboard beginning at the current line position. Input ends at blank line. |
| insert before (ib) | Same as "insert" edit command except lines are inserted ahead of current line. |
| join (j) | Allows concatenation of subsequent lines to current line |
| locate (l) | Finds indicated number of occurrences of string beginning at current line position |
| modify (m) | Allows user to make same column-wise changes to one or more lines beginning at the current line pointer |
| paste (pa) | Inserts lines from named clip file into working file before/after current location |
| pastef (pf) | Allows insertion of the contents of a file into the file being edited before/after the current location |
| print (p) | Lists one or more lines of file ( line pointer is also moved ) |
| reorder (re) | Allows reordering of the lines in the current file by specific line number sequence |
| restart (r) | Back to beginning of edit ( no changes made ) |
| scan (sc) | Lists one or more lines of file ( line pointer does not move ) |
| showclip (s) | Lists information for all/named clip file(s) |
| split (spl) | Allows the current line to be broken into two or more parts and added as subsequent new lines |
| status (st) | Lists current file information and edit environment flags. |
| top (t) | Moves line pointer to first line of file |
| uncut (u) | Restores previous cut lines if no intervening "copy" done |
| verify (v) | Turns on trace printing |
| where (w) | Prints the line associated with the current line pointer |
Some of the Editor commands require/allow arguments to follow the command name or abbreviation. For those commands, the following command functions and syntax forms are given.
The clip file referenced in the following is nothing more than a temporary file which contains lines which have been removed from the file being edited. A clip file is deleted at the end of an edit session.
Syntax : @ #
where, "#" = desired line number
Function : Changes the current line pointer to specified
line number or to last line of file if "#" is greater
than the number of lines in the file.
Example :
@ 14
Will change the current line pointer to line number 14
Function : Does not move the pointer and repeats the last command.
Function : Advances the pointer one line and repeats the last command.
where, "num1" is a positive/negative integer
Function : moves the pointer ahead/back "num1" lines
Example :
# 10
Will advance the pointer 10 lines. If 10 lines would position the file being
edited beyond the last line, the pointer will be set to the last line.
Function : Ends edit of current file, NOT implementing any changes
where, "#" = an integer number of lines. The default value of # is 1.
Function : Adds the string to be specified on the next line to the
next # lines, starting with the current line.
Example :
add 4
Will add to the current line and next 3 lines, the text on the following
line.
where, "char1" = a single character
Function : If "char1" specified, changes the default DESL modify
blanking character from an ampersand (&) to the specified character
("char1"). If no "char1" is specified, the default character is
reinstated to the ampersand.
Example :
bc $
Will change the modify blanking character to a dollar sign, $.
Function : Moves the pointer to the last line in the file.
Example :
bottom
Will move the pointer to the last line in the file.
Function : Turns off trace printing.
Example :
brief
Will turn offtrace printing. See the verify
edit command.
where, "string1" = old string, "string2" = new string, and
# = number, or asterisk (default = 1)
Function : changes "string1" in next # lines containing "string1" to "string2"
Example :
c alpfa alpha
Will change the next occurrence of "alpfa" to "alpha".
Example :
clrclip
Will clear the current clip file if one exists.
where, "string" = text string , "#1" = beginning line no.,
"#2" = ending line number or total number of lines
(if #1 not given), and "clipname" = desired name of
of "clip file" to receive lines being copied.
(default clip name of form "clip####")
Function : copies lines from current file to clip file
Example :
copy 4 8 clip48
Will copy lines 4 through 8 to a section of the clip file named "clip48".
where, "string" = text string, "#1" = beginning line number,
"#2" = ending line number or total number of lines
( if #1 not given ), and "clipname" = desired name
of "clip file" to receive lines being copied.
(default name is of form "clip####")
Function : copies lines from current file to clip file; lines
copied are removed
Example :
Will remove lines beginning with the first line that contains the
string "line1" through the first line which contains the string "line8".
The lines removed will be written to a section of the clip file named
"clip18".
where, "char1" = a single character
Function : If "char1" specified, changes the default DESL modify
deleting character from a pound (+) to the specified character
("char1"). If no "char1" is specified, the default character is
reinstated to the pound sign.
Example :
dc !
Will change the modify deleting character to a exclamation mark, !.
where, "string" = text string, "#1" = beginning line number,
"#2" = ending line number or total number of lines
(if #1 not given)
Function : deletes lines from current file
Example :
Function : Ends the edit session incorporating all of the accumulated
edit operations in the file being edited.
Example :
end
Will end the current edit session.
where, "char1" = a single character
Function : If "char1" specified, changes the default DESL modify
inserting character from a circumflex () to the specified character
("char1"). If no "char1" is specified, the default character is
reinstated to the circumflex sign.
Example :
ic I
Will change the modify inserting character to a capital I.
where, "fn" is the name of a file containing a series of
DESL editor commands, not containing another input
command.
Function : Specifies a file from which to begin pulling edit commands
until an end-of-file (EOF) is reached or until an "e(nd)" edit command
is reached.
Example :
input editfile.1
Will begin reading the file "editfile.1" using each legitimate
DESL editing command encountered until the "e(nd)" command
is seen, at which time the editing will end, or until an EOF is
encountered at which time the reading of the file will end
and control will return to the standard input stream.
Function : Allows the insertion of one or more lines beginning after the
current pointer.
Example :
insert
Will read the following lines from the standard input into the file being
edited after the current pointer position. The input
will end when an empty line is encountered.
Function : Allows the insertion of one or more lines beginning before the
current pointer.
Example :
insert before
Will read the following lines from the standard input into the file being
edited before the current pointer position. The input
will end when an empty line is encountered.
where, "#1" = number of below lines to append to current line
Function : Pulls in the indicated number (default = 1) of lines below
current line and appends them to the current line. The lines appended
to the current line are eliminated from the file.
Example :
Will append the next 2 lines to the current lines and remove the
next two lines from the file.
where, "string" = text string to find and
"#1" = number of occurrences of the string to find
Function : repositions the line pointer based on a string search
Example :
Will reset the pointer to the fifth line which contains the string
"alpha".
where, "#1" = number of lines to modify (default=1)
Function : allows character blanking, changes, and insertions
Example :
"modify" will reply with three lines which would look like the following :
to which the user would respond by entering the appropriate
modification characters under the desired line section : # to
delete the above character, & to blank the above character, and ^str#
to insert the string "str" ahead of the character pointed
to by the circumflex, ^. Entering any other character will force
the replacement of that character for the character immediately
above it. This modification mode is exited by entering a carriage
return after the desired changes have been made.
where, clipname = the clip file from which to extract lines
Function : inserts contents of named clip file after or "before" the
current line
Example$11 :
Will pull the section named "clip48" from the clip file and insert
it after the line currently being pointed to.
where, "fn" is the name of the file to paste into the file currently being
edited, and "before" or "b" implies before the current line.
Function : If "b" or "before" is specified after the file name
the contents of the named file
are read into the file currently being edited before the current line.
The default situation is to paste in lines after
the current line.
Example :
pastef file23
Will read the contents of the file "file23" into the file currently
being edited after the line currently being pointed to.
where, "#" = number of lines to print, beginning with the
current line if "#" = positive, or beginning "#" lines
previous to the current line if "#" negative
Function : prints one or more lines from the file being edited;
the line pointer is left at the last line printed.
Example :
Will print ALL of the remaining lines. The line pointer will be
at the first line at the end of the print operation.
where : #1, #2, #3 and #5 are line numbers, #4 is an increment.
Function : To specify the explicit desired order of the lines in the
file being edited. The "to" and "by" strings serve to imply an
incrementing or decrementing series of line numbers. The "by" serves
to reset increment or decrement to something other than the default
value of 1. A maximum of 5000 lines can be reordered. After this
DESL edit command has been completed the file currently being edited
will have had up to 5000 of its records reordered.
Example :
reorder 1 3 to 5 2 6 to 345
Here, the lines in the file being edited are rearranged
such that the new order is line 1, 3, 4, 5, 2, and lines
6 through lines 345. If there were more than 345 lines
in the original file, they will be lost.
Function : To go back to the point where the editing of the file has
just begun - i.e., to negate all of the editing commands which have
been specified thus far in the editing session.
Example :
restart
Will effectively get back to the situation in which the file being edited
is just like it was before the editing had begun.
where, "#" = number of lines to print, beginning with the
current line if "#" = positive, or beginning "#" lines
previous to the current line if "#" negative.
Function : prints one or more lines from the file being edited;
the line pointer is not moved from its current position.
Example :
Will print the next 4 lines. The pointer will be unchanged.
where, "clip_name" is the name of an optional clip file.
Function : To list the information in all or the named clip files.
If no clip name is specified, a summary of all clip files
will be shown. The summary contains the clip name(s) and the number of
lines contained in each clip.
Example :
showclip clip4
Will list the information currently contained on the clip file "clip4".
where, "#" is the number of lines to split.
Function : Breaks one or more lines into two or more new lines each.
The default number of lines to split is 1. The user is presented with a
modify-like representation of the current line under which is
to be entered the positions before which to use as the
position in the lines to split the lines. The marker to use as
the pointer character is the circumflex, .
Example :
split 5
"split" will reply with three lines which would look like the following :
Here, the next 5 lines, beginning at the current
line (shown), are split into new lines according to the
modify-like line entered.
If it was desired that the current line (and the next 4 lines) was to
be split just before the cl Coeff- ... part of the
string, then the user input would be the following :
The resulting 2 new lines for this original single line would be :
Similarly, the next 8 lines would contain the 2-for-1 result of having
split four more lines, to fulfill the original split of 5 lines.
Function : A report of information relative to the file currently
being edited as well as current system edit flags is presented.
Example :
status
Will present a report on the file currently being edited.
Function : Move the line pointer to the first line in the file.
Example :
top
Will move the pointer to the file currently being edited to the
first line in the file.
Function : Will undo the most previous "cut" operation if
there has been no intervening copy edit command issued.
Example :
uncut
Will undo the most previous "cut" operation- i.e., will restore the
"cut" lines to the file currently being edited.
Function : Turns on trace printing.
Example :
verify
Will turn ontrace printing. See the brief
edit command.
Function : Reports the current file line pointer position.
Example :
where
Will report the current file line pointer position.
[Top][Bottom]
(
TLperiod)
"."
[Top][Bottom]
(
TLperiod2)
".."
[Top][Bottom]
(
TLpound)
"#"
[Top][Bottom]
(
TLabort)
"abort"
[Top][Bottom]
(
TLadd)
"add"
[Top][Bottom]
(
TLbc)
"bc"
[Top][Bottom]
(
TLbottom)
"bottom"
[Top][Bottom]
(
TLbrief)
"brief"
[Top][Bottom]
(
TLchange)
"change"
[Top][Bottom]
(
TLclrclip)
"clrclip"
[Top][Bottom]
(
TLdc)
(7) "dc"
[Top][Bottom]
(
TLdelete)
delete
[Top][Bottom]
(
TLend)
"end"
[Top][Bottom]
(
TLic)
"ic"
[Top][Bottom]
(
TLinput)
"input"
[Top][Bottom]
(
TLinsert)
"insert"
[Top][Bottom]
(
TLinsertb)
"insert before"
[Top][Bottom]
(
TLjoin)
join
[Top][Bottom]
(
TLlocate)
locate
[Top][Bottom]
(
TLmodify)
modify
. 1 2 3 4 5 6 7
123456789012345678901234567890123456789012345678901234567890123456789012
files r10 nameset 1 $^A$41a = alpw cl $^XCoeff-of-Drag = cdA
[Top][Bottom]
(
TLpaste)
paste
[Top][Bottom]
(
TLpastef)
"pastef"
[Top][Bottom]
(
TLprint)
print
[Top][Bottom]
(
TLreorder)
"reorder"
[Top][Bottom]
(
TLrestart)
"restart"
[Top][Bottom]
(
TLscan)
scan
[Top][Bottom]
(
TLshowclip)
"showclip"
[Top][Bottom]
(
TLsplit)
"split"
. 1 2 3 4 5 6 7
123456789012345678901234567890123456789012345678901234567890123456789012
files r10 nameset 1 $41a = alpw cl Coeff-of-Drag = cdA
. 1 2 3 4 5 6 7
123456789012345678901234567890123456789012345678901234567890123456789012
files r10 nameset 1 $41a = alpw cl Coeff-of-Drag = cdA
.
files r10 nameset 1 $41a = alpw
cl Coeff-of-Drag = cdA
[Top][Bottom]
(
TLstatus)
"status"
[Top][Bottom]
(
TLtop)
"top"
[Top][Bottom]
(
TLuncut)
"uncut"
[Top][Bottom]
(
TLverify)
"verify"
[Top][Bottom]
(
TLwhere)
"where"
|
30 Research Drive Hampton, VA 23666 Voice: (757) 865-1400 Toll Free: (800) 288-3998 FAX: (757) 865-8177 |