home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
SLICKOS2.ZIP
/
SLICK.DOC
< prev
next >
Wrap
Text File
|
1989-12-01
|
329KB
|
7,880 lines
@SLICK MA=4 74 4 , TABS=1 4 7 10 13 16 19 22 25 28 31 34 37 40 43 46 49 52 55 58 61 64 67 70 73 76 79 82 85 88 , WWS=3, IWT=0, ST=1,
(command,cursor): + number
Moves the cursor the specified number of lines down.
(command,cursor): - number
Moves the cursor the specified number of lines up.
(command,cursor): 0 number
Moves the cursor to the specified line number. The leading digit
0 zero is not required. Any line number may be typed on the command
line and the (DEFC) for '0' will be called.
Example
100 - Move cursor to line 100
(command,search): /,L /string[/ [E] [I] [-] [M] [<] [>] [R] [W]]
This command description assumes invocation from the command line. The
/ or L commands may also be invoked from the FIND menu (MENU, "Search",
"Find...") which allows the string and option parameters to be entered
in separate input fields without delimiters.
Searches for the string specified. If you use the L command, the first
non blank character is used as the delimiter. Multiple options having
the following meaning may be specified:
E Exact case
I Ignore case
- Reverse search
M Limit search to marked area
< If found, cursor is positioned at beginning of word
> If found, cursor is positioned at end of word
R Interpret string as a regular expression
W Limits search to words. Used for searching for variables.
W=regular expression
Specifies the valid characters in a word. The default value is
[A-Za-z0-9_$] and may be changed by the command
WORD-CHARS (CONFIG, "Other options...", "Word
characters...").
When case sensitivity options E or I are not specified, the default
search case set by the SEARCH-CASE command is used. The search string
is not interpreted as a regular expression unless the R option is
specified.
Example
/xyz/- Search for "xyz" using default search case
in reverse.
L /xyz/- Search for "xyz" using default search case
in reverse. Notice that prefixing the
string "/xyz-" with L has no effect on this
command.
L $xyz$- Search for "xyz" using default search case
in reverse. The L command can change the
string delimiter which in this case is not
necessary.
L $/$ Search forward for the character slash. The L
command has been used so that the string
delimiter could be changed to $ which allows
searching for the / character.
L $/$- Search backward for the character slash.
/i/w Search for the variable i.
/xyz/e Search for "xyz" in exact case.
Regular expressions are defined as follows:
^ Matches beginning of line
$ Matches end of line
? Matches any character except new line.
X+ Minimal match of one or more occurrences of X.
X# Maximal match of one or more occurrences of X.
X* Minimal match of zero or more occurrences of X.
X@ Maximal match of zero or more occurrences of X.
~X Search fails if expression X is matched. The expression
^~(if) matches the beginning of all lines that do not start
with if.
(X) Matches sub-expression X.
{X} Matches sub-expression X and specifies a new group.
[char-set] Matches any one of the characters specified by char-set.
A dash '-' character may be used to specify ranges. The
expression [A-Z] matches any upper case letter.
[~char-set] Matches any character not specified by char-set.
A dash '-' character may be used to specify ranges. The
expression [~A-Z] matches all characters except upper
case letters.
X|Y Matches X or Y.
\c Specifies cursor position if match is found. If the
expression xyz\c is found the cursor is placed after the z.
\n Matches newline character. Useful for binary files only.
\r Matches carriage return. Useful for binary files only.
\t Matches tab character.
\b Matches backspace character.
\f Matches form feed character.
\xhh Matches hex character hh.
\ddd Matches decimal character ddd.
\char Declares character after slash to be literal. For
example '\:' represents the colon character.
:char Matches predefined expression corresponding to char.
The predefined expressions are:
:a [A-Za-z0-9] Matches alphanumerics
:b ([ \t]#) Matches blanks
:c [A-Za-z] Matches alphabetic
:d [0-9] Matches digit
:f ([~\[\]\:\\/<>|=+;, \t]#) Matches filename part
:h ([0-9A-Fa-f]#) Matches hex number
:i ([0-9]#) Matches integer
:n (([0-9]#(.[0-9]#|)|.[0-9]#)([Ee](\+|-|)[0-9]#|))
Matches floating point
number
:p (([A-Za-z]\:|)(\\|/|)(:f(\\|/))@:f)
Matches path
:q (\"[~\"]@\"|'[~']@') Matches quoted string
:v ([A-Za-z_$][A-Za-z0-9_$]@) Matches C variable
:w ([A-Za-z]#) Matches a word
Precedence of operators from highest to lowest.
+,#,*,@ These operators have the same precedence
concatenation
|
Example
/^defproc/r Matches lines that begin with the word
defproc.
/^definit$/r Matches lines that only contain the word
definit.
/^\:name/r Matches lines that begin with the string
":name". Notice that the backslash must
prefix the special character ':'.
/[\t ]/r Matches tab and space characters.
/[\9\32]/r Matches tab and space characters.
/[\x9\x20]/r Matches tab and space characters.
/p?t/r Matches any three letter string starting with
the letter 'p' and ending with the letter
't'. Possible matches are "pot" and "pat".
/s?*t/r Matches the letter 's' followed by any number
of characters followed by the letter 't'.
Two possible matches are "seat" and "st".
/for|while/r Matches the strings for or while.
/^:p/r Matches lines beginning with a file name.
/xy+z/r Matches x followed by one or more occurrences
of y followed by z.
/a+/r Matches shortest string of a's. Same as "/a/r".
/a#/r Matches longest string of a's.
See also I-SEARCH, C ,EDIT-WITH
(command,misc): ABORT
Cancels the command currently executing. If you write macros which use
the GETKEY() procedure, be sure to call the procedure ISCANCEL, or
IS_LIST_CANCEL to check whether the user has selected to abort.
(built-in,file): ABSOLUTE(filename)
Returns filename with exact path specification.
Example
/* Assuming current working directory is 'c:\slick' */
absolute('..\autoexec.bat')== 'c:\autoexec.bat'
absolute('s.exe') == 'c:\slick\s.exe'
See also RELATIVE
(built-in,window): ACTIVATE_VIEW view_id
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
A view holds the information necessary for the editor to remember your
location in a buffer. The internal view variables you can access are
'.cursor_x', '.cursor_y', '.line', '.col', '.left_edge', '.buf_id', and
'.window_id'. Each window has a ring of views to buffers. When you
have more than one window looking at the same buffer. The windows have
different views of that buffer. Usually all view variables are
different except for '.buf_id'. ACTIVATE_VIEW makes the
window,view, and buffer corresponding to view_id active.
Example
get_view_id view_id /* Remember current window,view, and buffer */
next_view /* switch to next view in current window. */
activate_view view_id /* Go back to orig. window,view, and buffer. */
See also GET_VIEW_ID, NEXT_VIEW, PREV_VIEW, QUIT_VIEW,
LOAD_FILES, NEXT_WINDOW, PREV_WINDOW
(command,mark): ADD
Adds marked text and inserts result below the last line of the mark.
If no operator exists between two adjacent numbers, addition is
assumed. '$' and ',' characters are stripped from the line before the
expression is evaluated. Accepts expressions supported by the MATH
commands. See MATH command for information on expression. The result
of each adjacent line is added. Mark text first with one of the
commands MARK-CHAR (Alt-Z), MARK-LINE (Alt-L), or MARK-BLOCK (Alt-B).
See also MARK-CHAR, MARK-LINE, MARK-BLOCK, MATH, MATHX, MATHO, MULT
(built-in,mark): ADJUST_BLOCK_MARK [mark_id]
Overlays the marked block of text specified at the cursor position and
fills in the source block with spaces. This primitive handles all
source and destination conflicts. A useful function for this primitive
is to move a large column of numbers up or down.
(command,mark): ADJUST-BLOCK-MARK
Overlays the visible marked block of text at the cursor position and
fills in the source block with spaces. This command handles all source
and destination conflicts. A useful function for this command is to
move a large column of numbers up or down. A block of text may be
marked with the MARK-BLOCK command (Alt-B).
(built-in,mark): ALLOC_MARK(['B'])
Returns a handle to a mark. If no more marks are available, RC is set
to TOO_MANY_MARKS_RC. Otherwise RC is set to '0'. This handle may be
passed as a parameter to other mark functions such as MARK_LINE and
COPY_MARK. For a complete list of mark functions type "help-class
mark" on the command line and press ENTER. The 'B' option is used for
allocating a book mark. Book marks can not be deleted and require one
view instead of two. A view contains cursor position information.
IMPORTANT: The active mark or mark showing may not be freed by the
FREE_MARK function. Use the SHOW_MARK function to make
another mark active before freeing the mark you have
allocated.
Example
/* Allocate a mark for copying the current line. */
mark_id= alloc_mark()
if rc then
message get_message(rc)
return(rc)
endif
mark_line mark_id
copy_mark mark_id
/* This mark can be freed because it is not the active mark. */
free_mark mark_id
return(0)
See also FREE_MARK, SHOW_MARK
(command,mark): APPEND file-name
Appends marked text to file specified. This command has no effects on
files already in memory. Mark text first with one of the commands
MARK-CHAR (Alt-Z), MARK-LINE (Alt-L), or MARK-BLOCK (Alt-B).
See also MARK-CHAR, MARK-LINE, MARK-BLOCK, GET, PUT
(command,file): APPEND-DIR [filespec] [filespec] ...
Appends a directory list of the files specified to the current buffer.
If filespec is not specified, the current directory list is used. This
command is useful when in fileman mode. Using the DIR or LIST commands
will change the mode to fileman mode.
See also DIR, LIST, APPEND-LIST
(command,file): APPEND-LIST [filespec] [filespec] ...
Appends a tree directory list of the files specified to the current
buffer. If filespec is not specified, the current tree directory list
is used. This command is useful when in fileman mode. Using the DIR
or LIST commands will change the mode to fileman mode.
See also DIR, LIST, APPEND-DIR, APPEND-LIST
(built-in,language): ARG([number])
If number is not given the number of arguments passed to the procedure
is returned. Otherwise the value of the parameter corresponding to
number is returned. The first parameter is 1.
Example
defmain
call p('first','second')
pause
defproc p()
say 'Received 'arg()' arguments'
for i=1 to arg()
say 'arg('i')='arg(i)
endfor
(built-in,misc): ASC(character)
Returns the ASCII code corresponding to the ASCII character given.
Example
asc('A') == 65
See also CHR
(command,misc): ASC [character]
Returns the ASCII code corresponding to the character given on the
command line. If character is not specified, the character at the
cursor position in the buffer is used.
See also CHR
(command,misc): ASCII-TABLE
Loads the file "asciitab" which contains a table of the ascii
characters with the corresponding hex and decimal character codes.
(command,misc): AUTO-RESTORE [on|off]
When AUTO-RESTORE is on, the SAFE-EXIT command (Alt-X or Ctrl-X Ctrl-C)
will save the window configuration, buffer positions, and the command
retrieve buffer in the current directory before exiting the editor.
The next time the editor is invoked with no parameters, SLICK will
automatically resume your last edit session by restoring the window
configuration, buffer positions, and the command retrieve buffer.
Execute the command AUTO-RESTORE with no parameters to view the current
setting. You can manually save the window/buffer configuration with
one of the commands SAVE-WINDOW-CONFIG or XDOS. To manually restore
the window/buffer configuration, invoke SLICK with the "-r restore"
parameters.
See also SAVE-WINDOW-CONFIG, XDOS, RESTORE
(built-in,cursor): BACK_TAB
Places cursor at previous tab stop if any. To set the tab stops see
help on TABS command. If column is not in view, column is center
scrolled or smooth scrolled into view. See SCROLL_STYLE. Each
buffer has its own tab stops. The default tabs for new buffers as well
as the tabs of the current buffer may be set by the TABS command.
See also TAB, INTERNAL-VARIABLES, TABS
(built-in,cursor): BEGIN_LINE
Places cursor at column 1 of current line.
See also END_LINE
(built-in,mark): BEGIN_MARK [mark_id]
Places cursor on first character of marked area specified. If the mark
type is LINE, the cursor is moved to the first line of the marked area
and the column position is unchanged.
(command,mark): BEGIN-MARK
Places cursor on first character of visible mark. If the mark type is
LINE, the cursor is moved to the first line of the marked area and the
column position is unchanged.
(built-in,mark): BEGIN_MARK_COMPARE([mark_id])
Compares current line position to first line of mark specified.
Return values
0 Current line is on first line of mark
>0 Current line is after first line of mark
<0 Current line is before first line of mark
-1 Text is not marked or mark is not in current buffer
See also END_MARK_COMPARE
(command,keyboard): BIND-TO-KEY [-r | -m] command
Binds command specified to key(s) you type. The -r and -m options may
be used to select key bindings to the root or mode key table.
If you don't quite understand what root and mode key tables
are, you should not specify the -r or -m option.
Here are the reasons for selecting each option:
-r You want this key binding to be active in all modes.
-m You want this key binding to be active only in the
current mode.
If the current mode is fundamental, the -r and -m options have no
effect. Keys bound while in fundamental mode will be active in all
modes unless there is a mode key binding.
The most common mistake occurs under the following circumstances:
* The current mode is SLICK, C, or PASCAL
* The BIND-TO-KEY command is invoked without the -r option
* One of the keys ENTER or SPACE BAR is selected to be rebound
The above sequences rebinds either ENTER or SPACE BAR only for the
active mode. This is not usually what was intended. Specify the -r
option when you want a key binding to be active in all modes.
When no options are specified a mode key table binding takes precedence
over a root key table binding. When the mode key table has no binding
for the key, the root key table binding is selected. After running the
BIND-TO-KEY command, use the "write-state" command to save the
configuration. Use the config menu items "Bind command to key..." and
"Save configuration...". To change the "summary of keys" help item,
execute the command "find-help summary-of-keys" and update the help.
The current key bindings may be listed by the command "list-keydefs".
See also UNBIND-KEY, LIST-KEYDEFS
(built-in,misc): BLOCK_WAS_READ([number])
Returns a non-zero number if the editor has read a block from a file.
Otherwise zero is returned. To reset this function the value '0' is
passed. However the reset value may be any whole number. The purpose
of this function is to allow macros to flush the keyboard buffer when
the editor is not keeping up with the key strokes.
Example
/* This macro allows the user to hold a key down which */
/* invokes this macro repeatedly to scroll down a file which is */
/* only partially loaded. No sudden screen jumps will occur. */
if block_was_read() then
call block_was_read(0)
call flush_keyboard(); /* slick proc */
endif
down
(command,cursor): BOTH-BACKTAB
Moves the cursor to the previous tab stop. To set the tab stops see
help on TABS command. Works on command line or text line. Type
"both?" on the command line for a list of the commands that operate on
the command line and text area.
See also BOTH-TAB, BOTH-MOVE-TEXT-TAB, BOTH-MOVE-TEXT-BACKTAB,
(command,cursor): BOTH-BEGIN-LINE
Moves the cursor to column one. Works on command line or text line.
Type "both?" on the command line for a list of the commands that
operate on the command line and text area.
(command,cursor): BOTH-BEGIN-LINE-TEXT-TOGGLE
If the visible cursor is on the command line, the cursor is moved to
column one of the command line. If the text area is active and the
cursor is not in column one, the cursor is placed on the first non
blank character of the current line. Otherwise the cursor is moved to
column one. Type "both?" on the command line for a list of the
commands that operate on the command line and text area.
(command,misc): BOTH-CAP-WORD
Capitalizes the first character of the current word and places the
cursor after the current word. To change the default word characters
invoke the WORD-CHARS command (CONFIG, "Other options...", "Word
characters..."). Works on command line or text line. Type "both?" on
the command line for a list of the commands that operate on the command
line and text area.
See also BOTH-LOWCASE-WORD, BOTH-UPCASE-WORD
(command,mark): BOTH-COPY-WORD
Copies word at the cursor to the clipboard. Invoking this command from
the keyboard multiple times in succession creates one clipboard. To
change the default word characters invoke the WORD-CHARS command
(CONFIG, "Other options...", "Word characters..."). Works on command
line or text line. Type "both?" on the command line for a list of the
commands that operate on the command line and text area.
(command,misc): BOTH-DELETE-CHAR
Deletes the character at the cursor. If the cursor is in the text
area ,the left/right margins are not 1/254, and no more characters
exist on the current line, the next line is joined to the current line.
Works on command line or text line. Type "both?" on the command line
for a list of the commands that operate on the command line and text
area.
(command,cursor): BOTH-DOWN
If the cursor is in the text area, the cursor is moved one line down.
If the cursor is on the command line, the next command in the retrieve
buffer ".command" is placed on the command line. Type "both?" on the
command line for a list of the commands that operate on the command
line and text area.
(command,cursor): BOTH-END-LINE
Moves the cursor after the last character of the line. Works on
command line or text line. Type "both?" on the command line for a list
of the commands that operate on the command line and text area.
(command,mark): BOTH-KILL-END-LINE
Deletes text from cursor to end of line and copies it to the clipboard.
If the visible cursor is in the text area and the rest of the line is
null, the next line is joined with the current line. Invoking this
command from the keyboard multiple times in succession creates one
clipboard. You may retrieve the deleted text with the command
BOTH-YANK. This command works on command line or text line. Type
"both?" on the command line for a list of the commands that operate on
the command line and text area.
(command,mark): BOTH-KILL-LINE
Deletes the current line and copies it to the clipboard. If the
visible cursor in on the command line, the cursor is moved to column
one. Invoking this command from the keyboard multiple times in
succession creates one clipboard. You may retrieve the deleted line(s)
with the command BOTH-YANK. This command works on command line or text
line. Type "both?" on the command line for a list of the commands that
operate on the command line and text area.
(command,mark): BOTH-KILL-WORD
Deletes from the cursor to the end of the word at the cursor or the
next word. Invoking this command from the keyboard multiple times in
succession creates one clipboard. A word is defined by the following
regular expression:
[a-zA-Z0-9_$]#
The above regular expression accepts valid characters in a C language
identifier. To change the default word characters invoke the
WORD-CHARS command (CONFIG, "Other options...", "Word characters...").
The deleted text may be retrieved by the command BOTH-YANK. This
command works on command line or text line. Type "both?" on the
command line for a list of the commands that operate on the command
line and text area.
(command,cursor): BOTH-LEFT
Moves the cursor one character to the left. If the visible cursor is
in the text area and the left/right margins are not 1/254, the cursor
will wrap to the end of the previous line when the left margin is hit.
Works on command line or text line. Type "both?" on the command line
for a list of the commands that operate on the command line and text
area.
(command,misc): BOTH-LINEWRAP-DELETE-CHAR
Deletes character at the cursor. If the visible cursor is in the
text area and the rest of the line is null, the next line is joined to
the current line. Works on command line or text line. Type "both?" on
the command line for a list of the commands that operate on the command
line and text area.
(command,cursor): BOTH-LINEWRAP-LEFT
Moves the cursor to the left. If the visible cursor is in the text
area the cursor will wrap to the end of previous line when the left
margin or column one is hit. If you want line wrapping to occur when
column is reached, set the line wrap on text option to 'Y' (CONFIG,
"Redefine common keys...", "Line wrap on text..."). Works on command
line or text line. Type "both?" on the command line for a list of the
commands that operate on the command line and text area.
(command,cursor): BOTH-LINEWRAP-RIGHT
Moves the cursor to the right. If the visible cursor is in the text
area the cursor will wrap to the next line when the end of line is hit.
Works on command line or text line. Type "both?" on the command line
for a list of the commands that operate on the command line and text
area.
(command,cursor): BOTH-LINEWRAP-RUBOUT
Deletes character to left of cursor. If the visible cursor is in the
text area the cursor will wrap to the end of previous line when the
left margin is hit. If you want line wrapping to occur when column one
is reached, set the line wrap on text option to 'Y' (CONFIG, "Redefine
common keys...", "Line wrap on text..."). Works on command line or
text line. Type "both?" on the command line for a list of the commands
that operate on the command line and text area.
(command,mark): BOTH-LIST-YANK
Allows you to select a clipboard from a list of your most recently used
(15 is the default maximum) clipboards to insert at the cursor.
Subsequent calls to the BOTH-YANK command will insert the same text as
your last BOTH-LIST-YANK. LINE type clipboards are inserted before or
after the current line depending upon the line insert style (CONFIG,
"Other options...", "Line insert style..."). By default, they are
inserted before. Works on command line or text line. Type "both?" on
the command line for a list of the commands that operate on the command
line and text area.
See also BOTH-YANK
(command,misc): BOTH-LOWCASE-WORD
Translates the current word to lower case and places the cursor after
the current word. To change the default word characters invoke the
WORD-CHARS command (CONFIG, "Other options...", "Word characters...").
Works on command line or text line. Type "both?" on the command line
for a list of the commands that operate on the command line and text
area.
See also BOTH-UPCASE-WORD, BOTH-CAP-WORD
(command,misc): BOTH-MAYBE-SPLIT-INSERT-LINE
If the visible cursor is on the command line, the command is executed.
Otherwise if insert state is on, the current line is split at the
cursor. Enough blanks are appended to the beginning of the new line to
align it with the first non blank character of the original line.
If the insert state is off, the cursor is moved to column one of the
next line.
Type "both?" on the command line for a list of the commands that
operate on the command line and text area.
(command,cursor): BOTH-MOVE-TEXT-BACKTAB
Moves text from cursor to end of line to previous tab stop. To set the
tab stops see TABS command. Works on command line or text line. Type
"both?" on the command line for a list of the commands that operate on
the command line and text area.
(command,cursor): BOTH-MOVE-TEXT-TAB
If indent with tabs is on, a tab character is inserted. Otherwise,
enough spaces are inserted to move the text from cursor to end of line
to the next tab stop. The default indent with tabs setting is
accessible through the CONFIG menu (CONFIG, "File extension setup...").
To set the tab stops see TABS command. Works on command line or text
line. Type "both?" on the command line for a list of the commands that
operate on the command line and text area.
(command,cursor): BOTH-NEXT-WORD
Moves the cursor to the end of the next word. If you want the cursor
placed on the beginning of the next word change the next word style
(CONFIG, "Other options...", "Next word style..."). A word is defined
by the following regular expression:
[a-zA-Z0-9_$]#
The above regular expression accepts valid characters in a C language
identifier. To change the default word characters invoke the
WORD-CHARS command (CONFIG, "Other options...", "Word characters...").
Works on command line or text line. Type "both?" on the command line
for a list of the commands that operate on the command line and text
area.
See also BOTH-PREV-WORD
(command,misc): BOTH-NOSPLIT-INSERT-LINE
If the visible cursor is on the command line, the command is executed.
Otherwise a blank line is inserted after the current line and the
cursor is aligned with the first non blank character of the current
line. The current line will not be split. See BOTH-SPLIT-INSERT-LINE.
(command,cursor): BOTH-PREV-WORD
Moves the cursor to the beginning of the previous word. A word is
defined by the following regular expression:
[a-zA-Z0-9_$]#
The above regular expression accepts valid characters in a C language
identifier. To change the default word characters invoke the
WORD-CHARS command (CONFIG, "Other options...", "Word characters...").
Works on command line or text line. Type "both?" on the command line
for a list of the commands that operate on the command line and text
area.
See also BOTH-NEXT-WORD
(command,keyboard): BOTH-QUOTE
Quotes the next character typed. If a non ASCII key is typed, the
character and scan code is inserted (Can insert ascii zero this way).
Useful for entering printer codes into a file.
(command,cursor): BOTH-RIGHT
Moves the cursor one character to the right. If the visible cursor is
in the text area and the left/right margins are not 1/254, the cursor
will wrap to the next line when the right margin is hit. Works on
command line or text line. Type "both?" on the command line for a list
of the commands that operate on the command line and text area.
(command,misc): BOTH-RUBOUT
Deletes the character to left of cursor. If the visible cursor is in
the text area and the left/right margins are not 1/254, the cursor will
wrap to the previous line when the left margin is hit. Works on
command line or text line. Type "both?" on the command line for a list
of the commands that operate on the command line and text area.
(command,misc): BOTH-SPLIT-INSERT-LINE
If the visible cursor is on the command line, the command is executed.
Otherwise the current line is split at the cursor. Enough blanks are
appended to the beginning of the new line to align it with the first
non blank character of the original line. Type "both?" on the command
line for a list of the commands that operate on the command line and
text area.
(command,cursor): BOTH-TAB
If indent with tabs is on, a tab character is inserted. Otherwise the
cursor moved to next tab stop. The default indent with tabs setting is
accessible through the CONFIG menu (CONFIG, "File extension setup...").
To set the tab stops see TABS command.
(command,cursor): BOTH-UP
If the cursor is in the text area, the cursor moves one line up. If
the cursor is on the command line, the previous command in the retrieve
buffer ".command" is placed on the command line. Type "both?" on the
command line for a list of the commands that operate on the command
line and text area.
(command,misc): BOTH-UPCASE-WORD
Translates the current word to upper case and places the cursor after
the current word. To change the default word characters invoke the
WORD-CHARS command (CONFIG, "Other options...", "Word characters...").
Works on command line or text line. Type "both?" on the command line
for a list of the commands that operate on the command line and text
area.
See also BOTH-LOWCASE-WORD, BOTH-CAP-WORD
(command,mark): BOTH-YANK
Inserts the last clipboard at the cursor. LINE type clipboards are
inserted before or after the current line depending upon the line
insert style (CONFIG, "Other options...", "Line insert style..."). By
default, they are inserted after the cursor. Works on command line or
text line. Type "both?" on the command line for a list of the commands
that operate on the command line and text area.
See also BOTH-LIST-YANK
(built-in,cursor): BOTTOM
Places text cursor at end of last line of buffer. See SCROLL_STYLE
built-in to change the way the bottom of buffer line scrolls into
view.
See also TOP
(command,cursor): BOTTOM-OF-BUFFER
Places text cursor at end of last line of buffer. If the "Preserve
column on top/bottom..." option is set to "Y", the cursor is placed on
the last line of the buffer and the column position is unchanged.
Executing this command when the cursor is already on the last line of
the buffer will move the cursor to the end of the last line. The
"Preserve column on top/bottom..." option is accessible through the
CONFIG menu (F5) under "Other options...". See SCROLL_STYLE built-in
to change the way the bottom of buffer line scrolls into view.
See also TOP-OF-BUFFER
(command,cursor): BOTTOM-OF-WINDOW
Places text cursor at the last line of the active window or last line
of file.
See also TOP-OF-WINDOW
(built-in,buffer): BUF_MATCH(name_prefix,find_first)
Returns buffer name of the buffer with prefix matching name_prefix. A
non-zero value for find_first, begins a new search. If find_first is
zero, the next matching buffer id is returned. '' is returned and RC
is set to STRING_NOT_FOUND_RC if no match is found. Search is not case
sensitive except for file systems like UNIX which are case sensitive.
Example
name_prefix='p' /* Find names that start with p */
name= buf_match(name_prefix,1) /* find first. */
loop
if rc then leave endif
say 'name='name
name= buf_match(name_prefix,0) /* find next. */
endloop
pause
See also FIND_INDEX, NAME_MATCH, FILE_MATCH
(misc,language): BUFFER
Declares buffer variables.
Syntax
BUFFER
variable [= initial_value_expression] [',']
variable [= initial_value_expression] [',']
....
The comma is used to declare multiple buffer variables on one line.
Each buffer maintains its own copy of buffer variables. Switching
active buffers changes the contents of the variable to the value of the
new buffer. When a new buffer is created, the initial value of
the buffer variable is set to initial_value_expression if given.
Otherwise it is set to ''.
(command,search): C /string1/string2[/[E][I][-][M][<][>][*][R][W]]
This command description assumes invocation from the command line. The
C command may also be invoked from the CHANGE menu (MENU, "Search",
"Change...") which allows the string1, string2, and option parameters
to be entered in separate input fields without delimiters.
Changes occurrences of string1 with string2. The First non blank
character is used as the delimiter. Multiple options having the
following meaning may be specified:
E Exact case
I Ignore case
- Reverse search
M Limit search to marked area
< If found, position cursor at beginning of word
> If found, position cursor at end of word
* Make changes without prompting
R Interprets string1 to be a regular expression. String2
may specify match groups with a backslash followed by a
a group number 0-9. Count the left braces '{' to determine
a group number. The first match group is "\0". See
/ command for syntax of regular expression.
W Limits search to words. Used to search and replace
variable names. The default word characters are
[A-Za-z0-9_$].
W=regular-expression
Specifies a word search and sets the default word
characters to those matched by the regular-expression
given.
When case sensitivity options E or I are not specified, the default
search case set by the SEARCH-CASE command is used. The string1
parameter is not interpreted as a regular expression unless the R
option is specified.
Example
c/x/y/m Replace occurrences of x in the marked area with y
using default search case sensitivity.
c $x$y$m Replace occurrences of x in the marked area with y
using default search case sensitivity. The string
'$' has been used required a space character after
the C.
c/x/y/e* Replace lower case occurrences of x with y without
prompting.
c/i/something_more_meaningful/w Replace occurrences of the
variable i with
something_more_meaningful
c/i/j/w=[A-Za-z] Replace occurrences of the word i with j
and specify value characters in word to
be alphabetics.
c/{if|while}/x\0y\1/r Replaces occurrences of if and while with
xify and xwhiley. Unmatched groups are
null. Note the \1 is replaced with null.
c $/$\\$ Replace forward slash with backslash. Two
backslashes represent single backslash for regular
expression search and replace.
See also L, /, I-SEARCH
(command,misc): C-ENTER
New binding of ENTER key when in C mode. Handles syntax expansion and
indenting for files with C or H extension. See config menu to change
syntax expansion/indenting options.
(command,misc): C-MODE
Activates C file editing mode. The ENTER and SPACE BAR bindings are
changed as well as the tab and margin options to provide syntax
expansion and indenting.
(command,misc): C-SPACE
New binding of SPACE key when in C mode. Handles syntax expansion and
indenting for files with C or H extension. See config menu to change
syntax expansion/indenting options.
(command,misc): CACHE-SIZE [buffer_ksize [shell_ksize [EMS_ksize
[state_ksize [rmu_ksize]]]]]
If no parameters are specified the current cache size values are placed
on the command line for editing.
The buffer_ksize parameter sets the maximum size of the text buffer
cache to buffer_ksize. If buffer_ksize is less than zero, the cache
will grow until no memory is available. In most cases, SLICK's cache
is 3 times faster than OS/2's cache. This means that you will want
SLICK's cache size small enough that OS/2's cache is not used. When
the cache is full, text is written to a spill file "$slick.nnn" where
nnn is a number. When the buffer cache size is set to a small value
you may need to change the read ahead/read behind line setting to avoid
disk thrashing. If the DISK light stays on too long while you scroll
your text files, execute the command "set-var def-read-ahead-lines 0"
to avoid the problem.
The shell_ksize parameter specifies the buffer cache size when
executing a program and has no effect on OS/2. When in DOS mode, the
cache size is reduced to shell_ksize when a program is executed.
Unlike the buffer_ksize parameter, shell_ksize may be as small as 0k.
The EMS_ksize parameter is used to limit the editors use of EMS memory
or extended memory. -1 specifies no limit. 0 specifies no use of EMS
memory or extended memory. SLICK will use all extended memory
specified by the -y invocation option if EMS_ksize is non-zero.
Modifying the EMS cache size may not take effect until the editor is
reinvoked (be sure to save the configuration before exit).
The state_ksize specifies the maximum amount of swappable state file
data (parts of SLICK.STA) to be kept in memory. -1 specifies no limit.
0 specifies that the editor preload all state file data. This is
useful if the file SLICK.STA is on a floppy which gets removed. By
default the editor only loads modules that have a DEFINIT and the key
table named DEFAULT-KEYS. The -ST invocation option may be used to
specify the state cache size. Modifying the state cache size may not
take effect until the editor is reinvoked (be sure to save the
configuration before exit).
The rmu_ksize specifies the amount of memory in kilobytes to allocate
when executing an external program. SLICK can reduce its memory usage
to about 8k when executing an external program by saving its memory
image to EMS memory, extended memory, or disk. A value of 0 specifies
as much memory as possible. You can override this default value by
prefixing the name of the program with the amount of memory in
kilobytes the program requires.
(built-in,misc): CACHE_SIZE([buffer_ksize [shell_ksize [EMS_ksize
[state_ksize [rmu_ksize]]]]])
The current cache size values are returned.
The buffer_ksize parameter sets the maximum size of the text buffer
cache to buffer_ksize. If buffer_ksize is less than zero, the cache
will grow until no memory is available. In most cases, SLICK's cache
is 3 times faster than OS/2's cache. This means that you will want
SLICK's cache size small enough that OS/2's cache is not used. When
the cache is full, text is written to a spill file "$slick.nnn" where
nnn is a number. When the buffer cache size is set to a small value
you may need to change the read ahead/read behind line setting to avoid
disk thrashing. If the DISK light stays on too long while you scroll
your text files, execute the command "set-var def-read-ahead-lines 0"
to avoid the problem.
The shell_ksize parameter specifies the buffer cache size when
executing a program and has no effect on OS/2. When in DOS mode, the
cache size is reduced to shell_ksize when a program is executed.
Unlike the buffer_ksize parameter, shell_ksize may be as small as 0k.
The EMS_ksize parameter is used to limit the editors use of EMS memory
or extended memory. -1 specifies no limit. 0 specifies no use of EMS
memory or extended memory. SLICK will use all extended memory
specified by the -y invocation option if EMS_ksize is non-zero.
Modifying the EMS cache size may not take effect until the editor is
reinvoked (be sure to save the configuration before exit).
The state_ksize specifies the maximum amount of swappable state file
data (parts of SLICK.STA) to be kept in memory. -1 specifies no limit.
0 specifies that the editor preload all state file data. This is
useful if the file SLICK.STA is on a floppy which gets removed. By
default the editor only loads modules that have a DEFINIT and the key
table named DEFAULT-KEYS. The -ST invocation option may be used to
specify the state cache size. Modifying the state cache size may not
take effect until the editor is reinvoked (be sure to save the
configuration before exit).
The rmu_ksize specifies the amount of memory in kilobytes to allocate
when executing an external program. SLICK can reduce its memory usage
to about 8k when executing an external program by saving its memory
image to EMS memory, extended memory, or disk. A value of 0 specifies
as much memory as possible. You can override this default value by
prefixing the name of the program with the amount of memory in
kilobytes the program requires.
(built-in,misc): CALL expression
Throws away return value of an expression returning a value.
Insures that RC variable is not changed and function return value
is not executed. Since function return values are no longer executed
unless enclosed in parenthesis, this built-in is no longer necessary.
Example
call getkey() /* wait for key, but do not execute it. */
(built-in,name): CALL_INDEX([arg1 [,arg2]... argN],index)
Calls command or procedure corresponding to name table index passing
arguments arg1,arg2..argN. The arguments may be call by reference
or call by value as long as a constant is not passed to a procedure
expecting a variable which can be referenced. If the procedure or
command is not linked to a module, the interpreter is stopped and
the message "Invalid argument" is displayed. Use the function
INDEX_CALLABLE to determine whether the procedure or command is linked
to a module.
Example
index=find_index('upcase-filter')
if not index_callable(index) then
message 'upcase-filter name in name table but not linked to module'
else
string=call_index('abc',index)
endif
See also INDEX_CALLABLE
(built-in,keyboard): CALL_KEY key
Calls command or keyboard macro bound to key. The key binding is
determined first by checking if mode_keys has a binding for key. If
so, that binding is used. If not, the root_keys binding for key is
used. If key is bound to a key table, another key is requested and the
new key table binding for the next key pressed is executed unless this
binding is another key table. To break an infinite key table loop
press CTRL-BREAK.
Example
key=getkey()
call_key key
See also GETKEY, TESTKEY, LASTKEY, RAW_LASTKEY,
KEY2NAME, KEY2INDEX, INDEX2KEY, LIST_BINDINGS,
KEYTAB_INDEX, SET_KEYTAB_POINTER
(command,keyboard): CANCEL-KBD-MACRO
When START-KBD-MACRO has been executed, the definition of one key
(usually the ESC key) is temporarily bound to this command. To change
the key rebound, modify the SLICK macro procedure "cancel-key-index".
You can find it by executing the command "find-proc cancel-key-index".
(command,file): CD [driveNpath]
Changes the current working directory to the drive and path if given.
A current directory message is displayed.
(built-in,string): CENTER(string, width [,pad])
Returns a symmetrically padded string of width characters. If the
length of string is less than width characters, the left and right of
the returned string will be padded with the pad character. The right
will always be padded the same or more than the left. If the length of
string is greater than or equal to width characters, the returned
string will be truncated on the left and right. The right will always
be truncated the same or more than the left. Pad defaults to ' '.
Example
center('test',6) ==' test '
center('test',6,'-') =='-test-'
center('test',7,'-') =='-test--'
center('test',3) =='tes'
center('test',2) =='es'
(command,cursor): CENTER-LINE
Centers the current line in the middle of the active window.
(command,file): CHANGE-DRIVE [driveNpath]
When a command of the syntax "d:" is executed, the editor translates
the command into "CHANGE-DRIVE d:" which calls this command procedure.
The CHANGE-DRIVE command changes the current working directory to the
drive and path specified. A current directory message is displayed.
(command,window): CHANGE-WINDOW
Allows you to point with the cursor keys to the window you wish to
change to.
See also NEXT-WINDOW, PREV-WINDOW, MOVE-EDGE, DELETE-WINDOW
(built-in,file): CHDIR path[,option]
Changes to drive and directory specified. If option is non zero the
current working drive is changed to drive specified. RC is set to 0 if
successful. Otherwise some of possible RC values are PATH_NOT_FOUND_RC
and DRIVE_NOT_READY_RC. Look through the file "rc.sh" for a complete
list of return codes.
(built-in,file): CHMOD [+|-][R][H][S][A] filename
Changes the attributes of the file specified. + adds the attribute
and - removes the attribute. The attributes have the following
meaning:
R Read-only
H Hidden
S System
A Archive
(command,file): CHMOD ^
(built-in,misc): CHR(ascii_code)
Returns the ascii character corresponding to ascii_code.
Example
chr(65)== 'A'
See also ASC
(command,misc): CHR number
Displays the ascii character corresponding to number on the command
line.
(built-in,display): CLEAR_MESSAGE
If a message is currently showing where the function key text
is, the function key text is redisplayed. Cancels pending message.
Example
unmark
mark_line /* Cause pending message "Text not marked". */
clear_message /* Message will not get displayed. */
See also MESSAGE
(command,misc): COLOR
Runs the external command "color.s". This macro presents a selection
list of the different color fields of the editor which may be changed.
Select a color field with the ENTER key and the colors may be changed
with the arrow keys. This macro is self explanatory. After running
the color command, use the "write-state" command to save the
configuration. Use the config menu items "Colors..." and "Save
configuration...". The editor has 2 sets of colors, one set for
monochrome monitors, and one set for color monitors. The color command
only changes the color set which is active. If the editor is not able
to correctly select the color set, use the COLOR-SET command to
select the color set.
(built-in,display): COLOR_FIELD(field_number[,color[,'A'|'D'[,'?'|'C'|'M']]])
Sets the color field value corresponding to field_number to the color
parameter if given. The current value of the color field specified
is returned. The color field constants have the suffix "_FIELD" and
are listed in "slick.sh". The optional third parameter selects
whether to set the default value of the color field or limit the
setting to the active value. The value 'D' sets the default value
and the value 'A' limits the setting to the active window. If the
third parameter is not given the default value is not set. The
fourth parameter selects the color set. The value '?' (the default)
selects the active color set. The values 'C' and 'M' correspond to
the color sets for color and monochrome monitors respectively.
(built-in,display): COLOR_SET(['M'|'C'|'?'])
Forces the active color set to the color set specified. The editor has
one set of colors for monochrome monitors and another set for color
monitors. If the editor is unable to correctly select the correct
color set because of your hardware configuration, use this function to
force selection of the correct color set. The input value '?' allows
the editor to decide. The input values 'M' and 'C' select the
monochrome and color color set respectively. The current value of the
color set is returned.
(command,display): COLOR-SET [M][C][?]
Forces the active color set to the color set specified. The editor has
one set of colors for monochrome monitors and another set for color
monitors. If the editor is unable to correctly select the correct
color set, use this command. Do not execute this command if the editor
is able to select the correct color set. Execute the command
"COLOR-SET ?" to allow the editor to decide. After running the
color-set command, use the "write-state" command to save the
configuration or select "Save configuration..." from the config menu.
(built-in,cmdline): COMMAND_DELETE_CHAR
Deletes the character under the command cursor. Visible cursor
does not have to be on command line when COMMAND_DELETE_CHAR is
executed.
See also COMMAND_STATE, COMMAND_TOGGLE, COMMAND_LEFT, COMMAND_RIGHT,
COMMAND_RUBOUT, EXECUTE, SET_COMMAND,
GET_COMMAND
(built-in,cmdline): COMMAND_LEFT
Moves the command line cursor one position to the left. Text area
cursor is not changed. When the left edge is hit, command line is
smooth scrolled or center scrolled. See SCROLL_STYLE.
See also COMMAND_STATE, COMMAND_TOGGLE, COMMAND_RIGHT,
COMMAND_DELETE_CHAR, COMMAND_RUBOUT, EXECUTE, SET_COMMAND,
GET_COMMAND
(built-in,cmdline): COMMAND_RIGHT
Moves the command line cursor one position to the right. Text area
cursor is not changed. When the right edge is hit, command line is
smooth scrolled or center scrolled. See SCROLL_STYLE.
See also COMMAND_STATE, COMMAND_TOGGLE, COMMAND_LEFT,
COMMAND_DELETE_CHAR, COMMAND_RUBOUT, EXECUTE, SET_COMMAND,
GET_COMMAND
(built-in,cmdline): COMMAND_RUBOUT
Deletes character if any to left of command line cursor and moves cursor
to left. When the left edge is hit, the command line is smooth
scrolled or center scrolled. See SCROLL_STYLE.
See also COMMAND_STATE, COMMAND_TOGGLE, COMMAND_LEFT, COMMAND_RIGHT,
COMMAND_DELETE_CHAR, EXECUTE, SET_COMMAND, GET_COMMAND
(built-in,cmdline): COMMAND_STATE()
Returns true (not '0') if the visible cursor is on the command line.
Returns '0' if editors cursor is on the command line.
Example
if command_state() then
command_left
else
left
endif
See also COMMAND_TOGGLE, COMMAND_LEFT, COMMAND_RIGHT,
COMMAND_DELETE_CHAR, COMMAND_RUBOUT, EXECUTE, SET_COMMAND,
GET_COMMAND
(built-in,cmdline): COMMAND_TOGGLE
If the visible cursor is on the command line, the cursor is moved to
the text area. Otherwise the visible cursor is moved from the text
area to the command line.
See also COMMAND_STATE, COMMAND_LEFT, COMMAND_RIGHT, CURSOR_DATA,
CURSOR_COMMAND, COMMAND_DELETE_CHAR, COMMAND_RUBOUT, EXECUTE,
SET_COMMAND, GET_COMMAND
(command,cmdline): COMMAND-TOGGLE ^
(misc,language): COMMENTS
There are two ways to define comments in the SLICK language. A
semicolon placed in the first column declares the rest of the line to
be a comment. The two characters '/*' open a comment and '*/' closes a
comment. Comments may be nested.
Example
; this is a comment
/* this is a /* nested */ comment */
(command,buffer): COMPILE
Executes an extension specific compile command. Each file extension
may have its own compile command. Parts of the buffer name may be
parsed into the compile command before it is executed. To add or
change the compile command for any extension, invoke the config menu
(F5 by default) and select "File extension setup...".
For DOS, all but approximately 10k of memory may be allocated to the
compile command. You specify how much memory your compiler needs and
SLICK will swap enough of itself to disk or EMS memory to run your
compiler. SLICK will automatically use EMS memory if you have an EMS
driver installed. If you want SLICK to use extended memory, invoke
SLICK with the -Y option (See help on INVOCATION).
For OS/2, the compile command is executed in SLICK's concurrent process
buffer.
See also MAKE-PROJECT, XDOS
(command,file): CONCUR-COMMAND command
Inserts command at end of ".process" buffer. If last line contains the
read point, text after read point is replaced with command. Concurrent
process session is started if necessary. If successful, 0 is
returned. Supported on OS/2 only.
(built-in,file): CONCUR_SHELL command
This functions supports OS/2 only. Creates a concurrent process
running in the current buffer. If command=='' then the OS/2 command
processor CMD.EXE is started. Otherwise command contains the program
name and arguments to be executed as a concurrent process. Each copy
of the SLICK editor can run one concurrent session. If two copies of
the SLICK editor are running in the same session only one may have a
concurrent session running because OS/2 only allows one process within
a session to be the parent of another session.
(command,menu): CONFIG
Runs the config menu. The config menu provides an easy way to change
the configuration of the colors, search case sensitivity, cursor
shape, cache size, spill file path, scroll style, language syntax
options, file load/save options, tabs, margins, and more.
(command,file): COPY text
Passes text to the DOS copy command. See DOS or OS/2 manual for syntax
of arguments.
(built-in,file): COPY_FILE source_name, dest_name
Copies the file source_name to dest_name. RC is set to 0 if
successful. Otherwise some of possible RC values are ACCESS_DENIED_RC,
ERROR_OPENING_FILE_RC, FILE_NOT_FOUND_RC, INSUFFICIENT_DISK_SPACE_RC,
ERROR_CREATING_DIRECTORY_RC, ERROR_READING_FILE_RC,
ERROR_WRITING_FILE_RC, DRIVE_NOT_READY_RC, PATH_NOT_FOUND_RC. Look
through the file "rc.sh" for a complete list of return codes.
(command,mark): COPY-MARK
Copies visible marked text. For character or block mark, text is
inserted at cursor position. For line mark, lines are inserted before
or after the current line depending on the line insert style (CONFIG,
"Other options...", "Line insert style..."). By default line marks are
inserted after the current line. Resulting mark is always on
destination text. Text may be marked with one of the commands
MARK-CHAR (Alt-Z), MARK-LINE (Alt-L), or MARK-BLOCK (Alt-B).
(built-in,mark): COPY_MARK [mark_id[,text_width[,leading_spaces[,
trailing_spaces]]]]
Copies marked text specified to cursor. For line mark, lines are
inserted before or after current line depending on the line insert
style (CONFIG, "Other options...", "Line insert style..."). The
default is after the current line. Resulting mark is
always on destination text.
If more than one parameter is specified, the first parameter must be a
view id which is positioned on a menu and not a mark id. The purpose
of this function is to provide formatting of the menu during the copy
to speed up menu processing. The leading spaces parameter specifies
the number of spaces to prefix each line with when copying. The
trailing_spaces and text_width parameters specify the number of spaces
to insert before the first semicolon of each line that is copied.
(command,mark): COPY-TO-CLIPBOARD
Copies visible marked text to the clipboard. If no text is marked the
current line is copied to the clipboard. All clipboards are stored in
the ".killed" buffer. The last clipboard may be retrieved by the
BOTH-YANK command (Ctrl-Y). Previous clipboards may be retrieved with
the BOTH-LIST-YANK command (Ctrl-X Ctrl-Y). Text may be marked with
one of the commands MARK-CHAR (Alt-Z), MARK-LINE (Alt-L), or MARK-BLOCK
(Alt-B).
See also KILL-MARK, BOTH-LIST-YANK, BOTH-YANK
(misc,language): CONST
Declares string constants.
Syntax
CONST
variable = constant_expression [',']
variable = constant_expression [',']
....
The comma is used to declare more than one constant on the same
line.
(command,misc): COUNT-LINES
Displays the number of lines in the current buffer.
(command,window): CREATE-WINDOW
Allows you to create a new window by pointing to edge for new window
with cursor keys.
See also MOVE-EDGE, NEXT-WINDOW, PREV-WINDOW, CHANGE-WINDOW,
DELETE-WINDOW
(built-in,cursor): CURSOR_COMMAND
Moves the cursor to the command line.
See also COMMAND_STATE, COMMAND_LEFT, COMMAND_RIGHT, CURSOR_DATA,
CURSOR_COMMAND, COMMAND_DELETE_CHAR, COMMAND_RUBOUT, EXECUTE,
SET_COMMAND, GET_COMMAND
(built-in,cursor): CURSOR_DATA
Moves the cursor to the text area.
See also COMMAND_STATE, COMMAND_LEFT, COMMAND_RIGHT, CURSOR_DATA,
CURSOR_COMMAND, COMMAND_DELETE_CHAR, COMMAND_RUBOUT, EXECUTE,
SET_COMMAND, GET_COMMAND
(command,misc): CURSOR-ERROR
This command is typically invoked when the concurrent process buffer
created by the START-PROCESS command is active and provides additional
support for processing compiler error messages from within the editor.
However, it can also be used to edit a filename such as an include
filename at the cursor. If the current line is recognized as an error
message, the cursor is placed on line and column of the file specified
by the message. Otherwise the filename at or before the cursor is
loaded for editing. The search strategy for include files is as
follows:
1. Current directory.
2. Same directory as current buffer.
3. Include directories specified by the file extension setup
menu.
See NEXT-ERROR command for information on recognized error messages.
See also NEXT-ERROR
(command,misc): CURSOR-SHAPE [ins_top ins_bot replace_top replace_bot]
Sets the cursor shape for insert mode and replace mode. To make this
function independent of hardware, this function maps the numbers 1 to
1000 to the actual number of scan lines in a character. If no
parameters are specified, the current settings are placed on the
command line for editing.
(built-in,misc): CURSOR_SHAPE([ins_top ins_bot replace_top replace_bot])
Returns the current cursor shape settings and sets insert/overwrite
cursor shape if specified. To make this function independent of
hardware, this function maps the numbers 1 to 1000 to the actual number
of scan lines in a character.
(misc,language): DEF [prefix_key] key [- key], key [- key] ... = command
Binds keys specified to command. Command must be defined by DEFC. The
words prefix_key and key above may be any valid key name. Type "help
key-names" on command line and press ENTER for a list of key names.
Example
def C_X 'B','b' = find_buffer
def C_A= command_toggle
def \0 - \255= nothing
(misc,language): DEFC name[,name [,name... ] [(const_exp)] [=]
[LOCAL
variable [',']
variable [',']
...
]
statements
The DEFC primitive is used to define a new command with argument
completion. Commands must be translated into binary code and loaded
by the LOAD command (MENU, "Macro", "Load module..."). A command may
be invoked by typing its name on the SLICK command line, invoking it
from a key, quoting its name in a SLICK language procedure, or typing
its name followed by arguments in parenthesis in a SLICK language
expression. Command procedures always have the scope UNIVERSAL and
may be bound to a key with the BIND-TO-KEY command (CONFIG, "Bind
command to key...").
Example
defc goto_line =
local param /* This line is not necessary to declare param */
/* as local. */
param=arg(1)
if param=='' or not isnumber(param) then
message 'Please specify line number'
return(1)
endif
.line=param
return(0)
Commands get command line arguments by calling the ARG function. When
a command is invoked from the command line, arg(1) contains the rest of
the command line after the name with leading spaces removed. For
example, invoking the edit command "e file1 file2" calls the E command
with "file1 file2" in arg(1). The PARSE built-in is an excellant
function for parsing a command line string (See help on PARSE). When
another macro calls a command procedure, more than one argument string
may be passed. Calling the ARG function with no parameters returns the
number of parameters the command or procedure (DEFPROC) was called
with.
Local variables do not have to be declared. Using a variable not
defined by UNIVERSAL, GLOBAL, BUFFER, or CONST declares the variable
to be a local variable. However, the LOCAL primitive allows you to
declare a local variable and ensure that the variable will be local
even if the name has already been declared else where as a GLOBAL,
UNIVERSAL, BUFFER, or CONST.
The optional constant expression const_exp indicates the type of word
arguments the command accepts and is used for argument completion
purposes. For a list of already defined argument types, look in the
file "slick.sh" for constants that end in "_ARG". The value of
constant_expression may be retrieved by the built-in function NAME_INFO.
There are two ways to call a command from another macro. The two
syntax are:
1. 'command-name argument1'
2. command_name(argument1,argument2...)
For syntax 1, the return statement sets the value of the variable RC.
If no return statement exists, the value of RC is unchanged. Commands
invoked from the command line are called in this manner except no
quotes are necessary. Note under scores in commands must be typed as
dashes when executed from the command line. For syntax 2, the return
statement sets the result of the function call. If no return statement
exists, the result of the function is ''.
Example
'goto-line 1' /* RC is set to '0'. Command line style */
status=goto_line('') /* status is assigned the result '1' */
For syntax 1, two arguments are always passed to the command. The
first argument is the contents of the rest of the string after the
command name with leading blanks removed. The second argument is '' or
is a set of flags with the following meaning:
4 Command should wait for key press after opening
shell window(PAUSE_COMMAND).
8 Command should not open shell window (QUIET_COMMAND)
For syntax 2, up to 15 arguments may be passed to the command. Each
argument can be retrieved by the function ARG. If the second argument
is passed, it should follow the meanings above.
(misc,language): DEFINIT
[LOCAL
variable [',']
variable [',']
...
]
statements
Initialization procedure called before DEFMAIN or DEFLOAD. This
procedure is the first procedure called when a module is loaded and is
also called when the editor is invoked for each module in the
"slick.sta" file. To determine why DEFINIT has been called check for
ARG(1)=="L". ARG(1) is set to "L" only when the module is loaded. If
the RETURN statement is used within the DEFINIT procedure it may not be
given an expression.
(misc,language): DEFKEYS name
Defines a key table. The DEF primitive changes the binding of keys of
the last key table defined. If no key table is defined, the
"root-keys" key table is used.
Example
defkeys c_keys
def ' '=c_space
def ENTER=c_enter
(misc,language): DEFLOAD
[LOCAL
variable [',']
variable [',']
...
]
statements
When a module is loaded this procedure is called after DEFINIT is
called. Initialization which only need to be performed one time are
usually performed here. If the RETURN statement is used within the
DEFLOAD procedure it may not be given an expression.
(misc,language): DEFMACRO name [=] string [,string [,string...
Defines a keyboard macro.
string may contain key name constants. Constants defined by CONST are not
supported. Type "help key-names" on command line and press ENTER for a
list of key names.
Example
defmacro dup_line = A_U A_L A_C A_U
(misc,language): DEFMAIN
[LOCAL
variable [',']
variable [',']
...
]
statements
When a module is executed this procedure is called after DEFINIT is
called. If the return statement is used within the DEFMAIN procedure
it must be given an expression which sets the variable RC. The ARG
function may be called to retrieve the command line passed to the
module. To execute a module from the command line, type the name of
the module followed by the command line you wish to pass to the module.
If the module needs to be recompiled (MAKE), the SLICK translator is
invoked before the module is executed.
(misc,language): DEFPROC [GLOBAL] id[([VAR] id[, [VAR] id ...])] [=]
[LOCAL
variable [',']
variable [',']
...
]
statements
The optional GLOBAL keyword may be used to limit the scope of a
procedure to the module it is defined in. By default, procedures are
UNIVERSAL and may be accessed by any module.
Example
defproc setyesno(var number,input)
local string /* This line is not necessary to declare string */
/* as local. */
string=upcase(input)
if string='Y' or string='YES' then
number=1
return(0)
elseif string='N' or string='NO' then
number=0
return(0)
endif
message 'Please specify YES or NO'
return(1)
The return statement sets the result of the function call. If no
return statement exists as in the example above, the result of the
function is ''.
Procedures may have up to 15 arguments defined. The procedure may be
called with more arguments than defined by the procedure declaration.
These "extra" arguments as well as the arguments defined in the
procedure declaration can be retrieved by the function ARG. The
minimum number of arguments the procedure may be called with is defined
by the procedure heading. When the procedure is called, the arguments
passed to the procedure are checked to make sure the call by reference
parameters correspond to variables of the caller.
Local variables do not have to be declared. Using a variable not
defined by UNIVERSAL, GLOBAL, BUFFER, or CONST declares the variable
to be a local variable. However, the LOCAL primitive allows you to
declare a local variable and ensure that the variable will be local
even if the name has already been declared else where as a GLOBAL,
UNIVERSAL, BUFFER, or CONST.
(command,file): DEL text
Passes text to the DOS del command. See DOS or OS/2 manual for syntax
of arguments.
(built-in,misc): DELETE_CHAR
Deletes character under text cursor. Command line is not affected.
(built-in,file): DELETE_FILE filename
Deletes the file specified. RC is set to 0 if successful. Otherwise
some of the possible RC values are ACCESS_DENIED_RC,
ERROR_OPENING_FILE_RC, FILE_NOT_FOUND_RC, DRIVE_NOT_READY_RC,
PATH_NOT_FOUND_RC. Look through the file "rc.sh" for a complete list
of return codes.
(built-in,misc): DELETE_LINE
Deletes current line of the current buffer. If the buffer
only has one line and DELETE_LINE is executed, the cursor is moved
to the top border of the window. This imaginary line is called
line 0.
See also GET_LINE, INSERT_LINE, REPLACE_LINE, DELETE_LINE
(command,mark): DELETE-MARK
Deletes the visible marked text. No clipboard is created.
(built-in,mark): DELETE_MARK [mark_id]
Deletes the marked text specified. No clipboard is created.
(built-in,name): DELETE_NAME index
Removes name entry corresponding to name table index. If index
is not a valid index, the interpreter is halted. Internal name types
such as procedures, variables, modules, and key tables may not be
deleted.
See also NAMES, FIND_INDEX, NAME_MATCH, NAME_NAME, NAME_TYPE, NAME_INFO
NAME_HELP, SET_NAME_HELP, FIND_LINK, CALL_LINK, INSERT_NAME,
SET_NAME_INFO, NAME_CLASS, SET_NAME_CLASS
(command,window): DELETE-WINDOW
Allows you to delete a window by pointing to the edge of the window you
wish to delete with the cursor keys.
(command,misc): DESELECT-ALL
Removes the character '>' from the beginning of each line of the
current buffer. Typically used in fileman mode. Using the DIR or LIST
commands will change the mode to fileman mode.
(command,mark): DESELECT-MARK
Removes the character '>' from the beginning of each line of the marked
text. Typically used in fileman mode. Using the DIR or LIST
commands will change the mode to fileman mode.
(command,file): DIR [command_line]
Creates a buffer and inserts a list of the files specified with
columns size, date, time, attributes, and name.
The mode is changed to fileman mode. When in fileman mode F1 becomes
help on file management keys and F10 brings up a menu of file
management commands.
command_line has the following syntax:
{filespec | ['-' | '+' option_letters]}
option_letters may be 'H','S','A','D','P','T' with the following
meaning.
H Hidden files. Default is off.
S System files. Default is off.
A Archive files. Default is off.
D Directory files. Default is on.
P Append path. Default is on.
T Tree file list. Default is off.
filespec may contain operating system wild cards such as '*' and '?'.
If filespec is not specified, the current directory is used.
Example
dir - List file and directory entries of the
current directory.
dir c:\ - List file and directory entries in the
root directory of drive C.
dir +HS c:\ - List file and directory entries in the
root directory of drive C including
hidden and system files.
(built-in,misc): DOS [command]
Executes the DOS command specified. If no command is specified, the
shell specified by the COMSPEC environment variable is executed with no
parameters. The DOS command is an internal command that must be quoted
when executed.
Example
'xcom dos dir/w' /* Execute the DOS dir command. */
/* XCOM is necessary to avoid calling */
/* the SLICK language DOS command. */
(command,misc): DOS [-e] [command]
Executes the external DOS command specified. If no command is
specified, the shell specified by the COMSPEC environment variable is
executed with no parameters. To execute the SLICK SHELL, execute the
command "SHELL". There is also an internal command DOS which performs
the same function as the (DEFC) DOS command. The DEFC for the internal
DOS command has been added for completion purposes. Specify the -e
parameter if you want the standard output of the command to be
processed as error messages. See help on NEXT-ERROR command for format
of error messages recognized.
See also XDOS
(built-in,cursor): DOWN [number [, stop_column]]
Moves cursor number of lines down. If number is not given, a value of
'1' is used. If line is not in view, line is center scrolled or smooth
scrolled into view. See SCROLL_STYLE. If bottom of buffer is hit RC
is set to BOTTOM_OF_FILE_RC. Otherwise, RC is set to 0. Use the
internal variable ".window_overlap" with the LIST_OVERLAP flag constant
(in "slick.sh") to automate display of a bounce bar. If stop_column is
specified, the DOWN primitive stops when a line of length greater than
or equal to stop_column is reached or until number of lines are
scrolled. Parameter two is useful for detecting lines that are too
long to be printed on a printer.
Example
down
if rc=BOTTOM_OF_FILE_RC then
message get_message(rc)
endif
See also UP
(built-in,mark): DUPLICATE_MARK([mark_id])
Returns handle to newly created mark identical to mark specified. If
mark_id=='' then the handle of the mark showing is returned.
Example
unmark;mark_line
mark_id=duplicate_mark() /* duplicate current mark. */
mark_showing=duplicate_mark('') /* Save handle of mark showing. */
copy_mark
show_mark mark_id /* Keep mark on source text. */
free_mark mark_showing /* Free mark on destination text. */
(command,file): E,EDIT [options filespec options filespec ...]
Edits the file(s) specified. Filespec may have wild card characters (*
or ? for DOS). Default options for the EDIT command may by set with
the LOAD-OPTIONS command. The edit mode of each file loaded is set
based on the file extension. To add mode support for a new file
extension, invoke the CONFIG menu (F5) and select "File extension
setup...". Each mode may have its on word wrap options, tab options,
compile command, structure begin/end matching, and key bindings.
The useful edit options are listed below. For a complete list of
options, see LOAD_FILES. A few options are only useful in
SLICK macros.
+#command Execute command on active buffer. For example,
"s test.c +#100" places the cursor on line 100 of
test.c.
+ or - L Turn on/off Load entire file switch.
+ or - S Turn on/off unmodified block swapping to spill file.
+nnn Load binary file(s) that follow in record width nnn.
+T [buf_name] Start a temp buffer with name buf_name.
+ or - E Turn on/off expand tabs to spaces switch. Default
is off. Only tabs of increments of 8 are supported.
+ or - D Turn on/off memory buffer name search. Disk file search.
+B buf_name Look in memory only for buffer with name buf_name.
The options above that only show a plus sign will also take a minus
sign. However their function will remain the same.
Example
e +l test Loads all of the file test and frees the file
handle. If test is already loaded, its buffer is
activated.
e +d test Loads the file test from disk regardless if a copy
already exists in memory.
e +b test Activates the buffer test if it exists.
e +t test Starts a new buffer called test.
e +40 +d test Loads the binary file test from disk in 40
character line width. File may be edited and
saved.
(built-in,misc): ECHO 'on'|'off'
Turns echo of command execution on or off. Before a command is
executed, the command is displayed in a shell window and a key must be
pressed before the command is executed. This command is useful for
tracing execution of external commands.
(command,misc): ECHO on|off
Turns echo of command execution on or off. Before a command is
executed, the command is displayed in a shell window and a key must be
pressed before the command is executed. This command is useful for
tracing execution of external commands.
(command,menu): EDIT-MENU
Runs the MAIN menu. Many useful commands which are not bound to
keys are accessible here.
(command,misc): EDIT-WITH filename command
Loads the file specified and executes the command specified. If
command modifies the file, a prompt appears asking whether to save the
file. The file is quit if it has been saved or is not modified. This
command is useful in fileman mode for executing the change command on
the selected files.
Example
for-select edit-with * c/string1/string2
for-select edit-with * c/string1/string2/** - No prompting
(built-in,misc): EDITOR_NAME()
Returns name of editor without path or extension. Used to check if a
.CMD file belongs to the editor. Look at the first line of
"shell.cmd" for an example of the use of EXTPROC.
(command,keyboard): END-KBD-MACRO
Ends the definition of a keyboard macro and names it LAST-KBD-MACRO.
See also START-KBD-MACRO, KBD-MACRO-TOGGLE, NAME-MACRO,
KBD-MACRO-END-EXECUTE
(built-in,keyboard): END_KBD_MACRO
Ends the keyboard macro definition started by START_KBD_MACRO.
After END_KBD_MACRO is executed key strokes will not be remembered
until the next START_KBD_MACRO is issued. GET_MACRO may be called
to get the string value of the macro. Use NAME_MACRO to insert the
macro and it's string value into the name table.
Example
start_kbd_macro
k=getkey() /* Type a key. */
end_kbd_macro
name_macro 'last-kbd-macro',get_macro() /* insert the macro. */
'last-kbd-macro' /* execute the macro. */
k=getkey() /* macro will return key */
/* type above. */
See also NAME_MACRO, GET_MACRO, START_KBD_MACRO
(built-in,cursor): END_LINE
Places cursor after end of current line. If column is not in view,
column is center scrolled or smooth scrolled into view. See
SCROLL_STYLE.
See also BEGIN_LINE
(command,mark): END-MARK
Places cursor on last character of visible mark. If the current mark
type is LINE, the cursor is moved to the last line of the marked area
and the column position is unchanged.
(built-in,mark): END_MARK [mark_id]
Places cursor on last character of mark specified. If the current mark
type is LINE, the cursor is move to the last line of the marked area
and the column position is unchanged.
(built-in,mark): END_MARK_COMPARE([mark_id])
Compares current line position to last line of mark specified.
Return values
0 Current line is on first line of mark
>0 Current line is after last line of mark
<0 Current line is before last line of mark
1 Text is not marked or mark is not in current buffer
See also BEGIN_MARK_COMPARE
(built-in,misc): ENV_MATCH(name_prefix,find_first)
Returns the name of the environment variable matching the prefix
name_prefix. If a match is not found, RC is set to STRING_NOT_FOUND_RC
and '' is returned. If find_first is non zero, matching starts from
the first environment variable. Otherwise matching starts after the
previous match.
See also GET_ENV, SET_ENV
(built-in,misc): ERROR_POS(pcode_offset filename)
Returns string containing pcode_offset and filename of the last
interpreter run-time error. The filename returned has no path.
pcode_offset is the offset in .sx (pcode) file of error. This
information may be passed to ST (the SLICK translator) to find the
corresponding line of the last run-time error. If the pcode_offset and
filename arguments are specified, the error position information is
set.
Example
parse value error_pos() with pcode_offset filename
sourcefilename= path_search(substr(filename,1,length(filename)-1))
call st('-f 'pcode_offset sourcefilename)
(misc,help): ESCAPE
The ESC key can be used to cancel any command that is prompting you to
press a key. The ESC key will also remove any pop-up window that is
waiting for you to press a key.
(built-in,misc): EXECUTE
Runs the command that is currently on the command line. Command may be
an internal command (DEFC), a keyboard macro command (DEFMACRO), an
internal editor command (XCOM,DOS), an external DOS or OS/2 command, or
an external command (extension '.S' or '.CMD'). Before the command is
executed, the command line is erased, and the command is inserted into
the command retrieve buffer ".command". See RETRIEVE_PREV,
RETRIEVE_NEXT. After the command is executed, RC is set to the return
code of the command.
NOTE: On DOS or OS/2, If a command line has redirection characters, the
command is passed to the command processor (usually COMMAND.COM or
CMD.EXE ). The command processor is also invoked for the following
commands.
BREAK CTTY ECHO PATH RD TYPE
CHDIR DATE ERASE PAUSE RMDIR VER
CLS DEL MD REN SET VERIFY
COPY DIR MKDIR RENAME TIME VOL
In addition for OS/2 the command processor is invoked for the
commands DETACH, and START
See also COMMAND_STATE, COMMAND_TOGGLE, COMMAND_LEFT, COMMAND_RIGHT,
COMMAND_DELETE_CHAR, COMMAND_RUBOUT, SET_COMMAND,
GET_COMMAND
(command,mark): EXECUTE-MARK
Executes the commands in the marked area. If text is not marked,
current line is executed.
(command,menu): EXECUTE-QUERY command query_view_id
Passes the arguments in the query buffer corresponding to query_view_id
to command. Afterwards the query buffer is quit. This command is not
intended to be bound to a key or executed from the command line.
(built-in,misc): EXIT [number]
Exits the editor without saving modified buffers. The editors return
code is set to number if given. Otherwise return code is set to 0.
(command,misc): EXIT-PROCESS
Exits the concurrent process buffer by entering the "exit" command and
waiting until the command processor finishes. This command supports
OS/2 mode only.
(command,misc): EXPAND on|off
Turns syntax expansion on or off.
(built-in,string): EXPAND_TABS(string[ ,start[ ,count[, 'E' | 'S']]])
start defaults to 1
count defaults to the rest of string
Fourth parameter defaults to 'E'
Returns a sub-string of input string containing tab characters. The
start and count specification correspond to the input string as if tab
characters were expanded according to the current buffers tab settings.
We call this type of text position or count imaginary. Strings
containing tab characters are expanded before displayed. Hence, the
need arises for a differentiation between physical and imaginary
positions. A physical position corresponds to a character in string.
The characters are numbered one to the length of string. An imaginary
position corresponds to a position in a string once tabs have been
expanded.
By default, the tab characters in string specified by start and count
are expanded to spaces according to the current buffer's tab settings.
If the 'S' option is given as the fourth parameter, only bisected tab
characters are expanded to the appropriate number of spaces. If count
extends past the imaginary length of string, the result is padded with
blank characters. A count of -1 specifies the rest of the input
string starting from the imaginary column start. The start parameter
must be greater than zero.
Example (Assume tabs are 1 9 17 25 33 41 ... (increments of 8))
expand_tabs('abc'\t'def'\t'ghi') =='abc'FIVE_SPACES'def'||
FIVE_SPACES||'ghi'
expand_tabs('abc'\t'def'\t'ghi',4) == FIVE_SPACES'def'FIVE_SPACES||
'ghi'
expand_tabs('abc'\t'def'\t'ghi',1,-1,'S') == 'abc'\t'def'\t'ghi'
expand_tabs('abc'\t'def'\t'ghi',4,-1,'S') == \t'def'\t'ghi'
expand_tabs('abc'\t'def'\t'ghi',5,-1,'S') == FOUR_SPACES'def'\t'ghi'
expand_tabs('abc'\t'def'\t'ghi',5,10,'S') == FOUR_SPACES'def'||
THREE_SPACES
see also TEXT_COL
(command,file): FILE [options] [filename]
Saves current file under name specified and quits the current file. If
filename is not specified, buffer name is used. Default options for
the FILE command may by set with the SAVE-OPTIONS command. Options
are:
+ or -O Turn on/off overwrite file switch. When on, no backup
of destination file is created.
+ or -T Turn on/off compress with tabs switch. Always uses
tab increments of 8 (1 9 17 ...).
+ or -E Turn on/off expand tabs to spaces switch. Default
is off. The default may be set by the SAVE-OPTIONS
command.
+ or -B Turn on/off binary save switch. Save file without
carriage return, line feeds, or end of file marker.
(command,file): FILE-COPY filename path
Copies file specified to directory specified. Directory is created if
it does not exist. Used by fileman mode.
(command,file): FILE-ERASE filename
Erase the file specified. Used by fileman mode.
(built-in,file): FILE_MATCH(name_prefix_options,find_first)
Performs find first, find next directory search.
name_prefix_options has the following syntax:
{name_prefix | ['-' | '+' option_letters]}
option_letters may be 'H','S','A','D','P' with the following
meaning.
H Include Hidden files. Defaults to off.
S Include System files. Defaults to off.
A Include Archive files. Defaults to off.
D Include Directory files. Defaults to on.
P Prefix match. Defaults to on.
V Verbose match. Defaults to off. When on, string
returned is the same format as the file manager file list
except that no path is included. Column constants in
"slick.sh" may be used to parse out name, file size,
date, time, and attributes.
DIR_SIZE_COL
DIR_SIZE_WIDTH
DIR_DATE_COL
DIR_DATE_WIDTH
DIR_TIME_COL
DIR_TIME_WIDTH
DIR_ATTR_COL
DIR_ATTR_WIDTH
DIR_FILE_COL
Note: There is an R option for read only files which
defaults to off. However, read only files will always
be included in file matching due to operating system
limits of DOS and OS/2.
When prefix match is on, file names with prefix matching name_prefix
are returned (the prefix "abc" matches "abcd" and "abce"). When prefix
match is off, a normal directory search is performed for file names
matching name_prefix. If any wild card characters such as '*' or '?'
are present in name_prefix, prefix matching is ignored.
A non-zero value for find_first, begins a new directory search. If
find_first is zero, the next matching file name is returned. '' is
returned if no match is found and RC is set to the error code. Search
is not case sensitive except for file systems like UNIX which are case
sensitive. If a directory is found, the name returned ends with a
backslash.
Example
/* Find all C source files in the current directory. */
/* '-P' turns off prefix match. No directories will be found */
/* since the D switch is not on. */
filename= file_match('*.c -P',1) /* find first. */
loop
if filename='' then leave endif
messageNwait('name='filename)
/* Be sure to pass filename with correct path. */
/* Result filename is built with path of given file name. */
filename= file_match(filename,0) /* find next. */
endloop
/* Find out if the file "junk" is read only */
line=file_match("-p +v junk",1)
if pos('R',substr(line,DIR_ATTR_COL,DIR_ATTR_WIDTH)) then
message 'File "junk" is read only'
else
message 'File "junk" is NOT read only'
endif
See also NAMES, FIND_INDEX, NAME_MATCH, BUF_MATCH, PATH_SEARCH
(command,file): FILE-MOVE filename path
Moves the file specified to the directory specified. Directory is
created if it does not exists. Used by fileman mode.
(command,file): FILEMAN-ATTR
Prepares command line for executing the CHMOD command on the selected
files. Used by fileman mode.
(command,menu): FILEMAN-ATTR-MENU
Runs fileman-attr-menu menu.
(command,file): FILEMAN-BACKUP
Prepares command line for executing the SUBCOPY command on the selected
files. Used by fileman mode.
(command,file): FILEMAN-COPY
Prepares command line for executing the FILE-COPY command on the
selected files. Used by fileman mode.
(command,file): FILEMAN-DELETE
Prepares command line for executing the FILE-ERASE command on the
selected files. Used by fileman mode.
(command,misc): FILEMAN-DESELECT-DOWN
Removes the '>' character at the beginning of the current line and
moves the cursor to next line. Used by fileman mode.
(command,misc): FILEMAN-DESELECT-UP
Removes the '>' character at the beginning of the current line and
moves the cursor to previous line. Used by fileman mode.
(command,misc): FILEMAN-EDIT
Loads the selected files for editing. Used by fileman mode.
(command,misc): FILEMAN-ENTER
Loads the file at the cursor or inserts directory file list. Used by
fileman mode.
(command,menu): FILEMAN-FILES
Runs the fileman-files menu.
(command,help): FILEMAN-HELP
Displays help for fileman in a pop-up window.
(command,misc): FILEMAN-KEYIN-NAME
Keys in file name at text cursor into the command line. Used by
fileman mode.
(command,menu): FILEMAN-MENU
Runs fileman-menu menu.
(command,misc): FILEMAN-MODE
The fileman mode keys are activated for the commands "dir" and "list".
The keys are redefined as indicated below
Alt-B Backup selected files Enter Edit current file or insert
Alt-C Copy selected files directory files.
Alt-M Move select files Space Select current file toggle
Alt-D Delete selected files '8' Select and cursor up
Alt-E Edit selected files '2' Select and cursor down
Alt-S Fileman select menu '9' Deselect and cursor up
Alt-F Fileman files menu '3' Deselect and cursor down
Alt-A File attributes menu Alt-N Keyin filename into command
F10 Fileman main menu
Selected directories are skipped by Backup, Move, Delete, Edit, and
Set file attribute commands.
(command,file): FILEMAN-MOVE
Prepares command line for executing the FILE-MOVE command on the
selected files. Used by fileman mode.
(command,menu): FILEMAN-SELECT
Runs fileman-select menu.
(command,misc): FILEMAN-SELECT-DOWN
Replaces the first character of the current line with '>' and moves the
cursor to next line. Used by fileman mode.
(command,misc): FILEMAN-SELECT-UP
Replaces the first character of the current line with '>' and moves the
cursor to previous line. Used by fileman mode.
(command,misc): FILEMAN-SPACE
If the visible cursor is in the text area, the select character '>' is
toggled on or off. Otherwise the default binding of space bar is
executed. Used by fileman mode.
(command,mark): FILL-MARK
Fills marked area with key you type. Text may be marked with one of
the commands MARK-CHAR (Alt-Z), MARK-LINE (Alt-L), or MARK-BLOCK
(Alt-B).
(built-in,mark): FILL_MARK character [,mark_id]
Fills the mark specified with character.
(command,buffer): FIND-BUFFER [buffer_name]
Activates the buffer specified.
(command,misc): FIND-ERROR
Finds the last SLICK interpreter run time error. The module with the
error is loaded and the cursor is placed on the line causing the error.
(command,help): FIND-HELP [item [help_type]]
Loads the "slick.doc" file and places the cursor on the help
item of type help_type specified.
(built-in,name): FIND_INDEX(name,name_t)
Returns name table index to name of type name_t. A name type match is
considered if (name_t & name_type(index)) is true. The name type flags
are listed in the file "slick.sh". Search is not case sensitive. All
underscore characters in name are converted to dash characters before
searching takes place.
See also NAMES, NAME_MATCH, NAME_NAME, NAME_TYPE, NAME_INFO,
NAME_HELP, SET_NAME_HELP, FIND_LINK, CALL_LINK, INSERT_NAME,
SET_NAME_INFO, NAME_CLASS, SET_NAME_CLASS, DELETE_NAME
(command,misc): FIND-MATCHING-PAREN
Finds the parenthesis that matches the parenthesis the cursor is on.
The supported parenthesis pairs are [], {}, and (). This command now
also matches begin/end structures for the languages C, PASCAL,
Assembly, Modula2, Clipper, and SLICK. For example, when editing a
SLICK module FOR matches ENDFOR, LOOP matches ENDLOOP, and IF matches
ENDIF. To add begin/end structure matching for another language
see help on SETUPEXT command.
See also KEYIN-MATCH-PAREN
(command,menu): FIND-MENU [menu_name[.menu_file]]
Loads the menu_file specified and places the cursor on the menu
menu_name. The menu_file parameter may not contain a path or
extension. The extension "mnu" is used. A path search is performed to
find the menu file. If menu_file is not given 'slick' is assumed. If
no argument is specified, a selection list of possible arguments is
created.
(command,help): FIND-PROC proc_name
Finds SLICK source code or help for the proc_name specified. Unlike
the FIND-TAG command, the FIND-PROC command does not use a tag file
and does not support module only (GLOBAL) scope procedures.
(command,search): FIND-TAG [proc_name]
The FIND-TAG command places the cursor on the source code for
proc_name. If proc_name is not specified, the procedure name at the
cursor is used. The MAKE-TAGS command must be used first to create a
tag file called "tags.slk" which is a list of your procedure names
followed by the source code file name. Once created, the MAKE-TAGS
command only needs to be reinvoked when a new procedure is written, a
procedure is deleted, or a procedure is moved to a different source
file. By default, the FIND-TAG command looks for "tags.slk" in the
current directory. If you want the FIND-TAG command to always use a
specific tag file, define an environment variable called TAGS.SLK which
contains the path and name of the tag file. The SPACE BAR and '?' keys
may be used to complete the procedure name. Currently the C, Pascal,
Modula2, Clipper, and Assembly languages are supported. See "tags.s"
for information on adding support for other languages.
See also MAKE-TAGS
(command,misc): FKEYTEXT
Runs the external command "fkeytext.s". This self explanatory macro
provides simple line editing functions for editing the function key
text. After changing the function key text, invoke the WRITE-STATE
command to save configuration.
(command,misc): FKEYTEXT-OPTIONS ['S'|H'|'O']
The function key text and message line have three configurations.
The options S, H, and O have the following meaning:
S - Show fkeytext. Message line and fkeytext line are
on different lines of the screen.
H - Hide fkeytext. One line of screen is used as
the message line. fkeytext is not displayed.
O - Messages temporarily overlaps the function key
text until a key is pressed.
If no option is specified, the current setting is shown.
See also STICKY_MESSAGE, MESSAGE, SET_FKEYTEXT, GET_FKEYTEXT
(command,misc): FOR-ALL command
Executes command specified on all the lines of the current buffer.
Parts of the line being executed are inserted into the command
specified according to the following specifications:
* Filename (Directory buffers only)
*L Entire line
*nnn Nth word is inserted
*P Path without backslash is inserted (Directory buffers
only)
*D Drive with : (Directory buffers only)
*N Name without extension (Directory buffers only)
*F Name with extension (Directory buffers only)
*E File extension without dot (Directory buffers only)
** star
Example
for-all say *L - Displays all lines of the current buffer
(command,misc): FOR-DIR command
Executes command specified on the selected files. Used by fileman
mode. Unlike the FOR-SELECT command, directory files are not skipped.
Execute the command "help FOR-ALL" for help on inserting parts of line
in the command.
(command,mark): FOR-MARK command
Executes command specified on the marked lines. Execute the command
"help FOR-ALL" for help on inserting parts of line in the command.
(command,misc): FOR-SELECT command
Executes command specified on the selected files. Used by fileman
mode. Directory files are skipped. See FOR-ALL for help on
inserting parts of line in command.
(built-in,mark): FREE_MARK mark_handle
Frees the mark corresponding to mark_handle. FREE_MARK will not free a
mark that is showing. Use SHOW_MARK if necessary to show another mark
before freeing the mark.
Example
/* Get handle to mark showing (default mark handle) */
current_mark_id=duplicate_mark('')
/* Allocate another mark. */
mark_id=alloc_mark()
mark_line mark_id
show_mark mark_id;call getkey()
show_mark current_mark_id
free_mark mark_id
See also ALLOC_MARK
(command,misc): FUNDAMENTAL-MODE
Switches to Fundamental mode key bindings.
(command,file): GET filename
Inserts the file specified before or after the current line depending
on the line insert style. The default is after the current line. The
line insert style is accessible through the config menu under "Other
options...".
(built-in,misc): GET_COMMAND var text [,var col [,var leftedge [,
var prompt[,var popup_x[,
var popup_y[,var popup_width[,
var popup_color]]]]]]]
Be sure to look at the macro function GET_STRING (See module "get.s")
and the QUERY command (see help on QUERY command) which allow a macro
to read input from the user. Unlike the GET_STRING function, the QUERY
command can prompt for multiple input fields in a pop-up window. The
GET_STRING function is typically used to read one string from the
command line near the bottom of the screen.
Returns the command line text, column position, left edge, prompt,
popup x, popup y, popup width, and popup color in the corresponding
variables.
See also COMMAND_STATE, COMMAND_TOGGLE, COMMAND_LEFT, COMMAND_RIGHT,
COMMAND_DELETE_CHAR, COMMAND_RUBOUT, EXECUTE, SET_COMMAND,
QUERY
(built-in,display): GET_CURSOR_XY var x,var y
Returns visible cursor coordinates in the variables x and y. x range
is 0..SCREEN_WIDTH()-1. y range is 0..SCREEN_HEIGHT()-1.
(built-in,misc): GET_ENV(name)
Returns the value of the environment variable name. If name is not
found RC is set to STRING_NOT_FOUND_RC and '' is returned.
See also ENV_MATCH, SET_ENV
(built-in,keyboard): GET_FKEYTEXT var text,var option
Sets the variable text to the function key text of the key table
"root-keys". Each key table has its own set of function key text which
may be up to 160 characters long. The variable option is set to one
of the following:
S - Show fkeytext. Message line and fkeytext line are
on different lines of the screen.
H - Hide fkeytext. One line of screen is used as
the message line. fkeytext is not displayed.
O - Messages temporarily overlap the function key
text until a key is pressed. "sticky messages"
(See STICKY_MESSAGE) do not go away
until another message is displayed.
(built-in,misc): GET_LINE var line
Places the current line of the current buffer into the variable line.
See also INSERT_LINE, REPLACE_LINE, DELETE_LINE
(built-in,keyboard): GET_MACRO()
Returns the value of the last macro defined or the macro currently
being defined. If the macro has overflowed the maximum macro size,
RC is set to KBD_MACRO_TOO_LONG_RC. Otherwise RC is set to 0.
See also NAME_MACRO, START_KBD_MACRO, END_KBD_MACRO
(built-in,mark): GET_MARK var start_col, var end_col, var buf_id[,
mark_id [,var buf_name]]
Returns start column, end column, buffer id, and buffer name of the
mark specified. If the mark specified has no type, RC is set to
TEXT_NOT_MARKED_RC.
(built-in,misc): GET_MESSAGE(error_code)
Returns message corresponding to error number error_code. If
error_code does not exists, "Message not available" is returned. The
error codes are listed in the file "rc.sh".
(built-in,mark): GET_REFLOW_POSITION Noflines_down,col
Returns relative position where cursor should be placed in resulting
reflowed text output from the REFLOW_MARK function. If the cursor does
not need to be moved, Noflines_down will be a negative number.
(built-in,misc): GET_VAR(index)
Returns the contents of the variable corresponding to the name table
index given.
Example
/* VAR_TYPE is defined in "slick.sh" */
index=find_index('rc',VAR_TYPE)
message 'rc='get_var(index)
See also SET_VAR
(built-in,window): GET_VIEW_ID view_id
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
A view holds the information necessary for the editor to remember your
location and scroll position in a buffer. Each window has a ring of
views to buffers. When you have more than one window looking at the
same buffer. The windows have different views of that buffer.
Example
get_view_id view_id /* Remember current window,view, and buffer */
next_view /* switch to next view in current window. */
activate_view view_id /* Go back to orig. window,view, and buffer. */
See also ACTIVATE_VIEW, NEXT_VIEW, PREV_VIEW, QUIT_VIEW, LOAD_FILES,
NEXT_WINDOW, PREV_WINDOW
(built-in,file): GETCWD([drive])
Returns the current working directory for the drive specified. drive
must be a one character drive letter. If an error is encountered, RC
is set to one of the return codes in "RC.SH" and '' is returned.
Example
message getcwd() /* Display current working directory. */
message getcwd('D') /* Display current working directory of */
/* drive D. */
(built-in,keyboard): GETKEY([options])
options defaults to '' and may be 'R' and/or 'K' and/or 'C'
'R' - Specifies no screen refresh
'K' - Retrieve keys from physical keyboard
and not from keyboard macro that is running.
'C' - Limit refresh to command line only. Used by
GET_STRING macro function to refresh text
in popup command line.
'N' - Get next key. When a SLICK language macro
uses GETKEY for multiple key sequence key
bindings, all GETKEY calls after the first
should pass this parameter. Otherwise
key stroke recording will not work since
terminating key stroke recording requires
that the last key sequence be removed.
Waits for a key to be pressed and returns a string representation of
the key typed. For ASCII keys a string of length 1 is returned except
for C_ENTER, C_BACKSPACE, ENTER, TAB, BACKSPACE, and ESC. For these
special keys and extended keys like A_L, a string of length 2 is
returned. These separations allows the control keys C_J, C_H, C_M, and
C_I to have a different binding from the keys listed above. This
function will return keys from a keyboard macro that is running unless
option 'K' is specified. If 'R' and 'C' options are not given, the
screen is refreshed and the shell window is closed. The shell window
is opened when an external program is executed or by the built-in
primitives SAY, SAYS, and PAUSE.
Example
key=getkey()
message 'The key pressed was 'key2name(key)
See also TESTKEY, LASTKEY, RAW_LASTKEY, CALL_KEY, KEY2NAME,
KEY2INDEX, INDEX2KEY, LIST_BINDINGS, KEYTAB_INDEX,
SET_KEYTAB_POINTER
(misc,language): GLOBAL
Declares a variable of the scope "global". The scope of a global
variable is limited to the module it is defined in. When the module
defining the global variable is unloaded, the space the variable used
is freed. Global variables may be saved from session to session by the
WRITE-STATE command.
Syntax
GLOBAL
variable [= initial_expression] [',']
variable [= initial_expression] [',']
....
The comma is used to declare global variables on one line.
Global variables are initialized to initial_expression when the module
is loaded. If initial_expression is not given, the variable is
initialized to ''.
(command,cursor): GOTO-LINE [line_number]
Moves the cursor to line number specified. Cursor column position is
not changed.
(built-in,help): GOTO_POINT p[,line_number]
Moves current buffer location to text position specified. If the text
position is found, .col is set to 1, .cursor_y is set to 0, and
.cursor_x is set to 0. The block number and the line number within the
block is encoded in p as two 16 bit numbers returned by the built-in
function POINT. If line_number is specified, the current line number
is set to line_number. The current line number may also be retrieved by
the built-in function POINT.
Example
index=find_index('goto-point',BUILT_IN_TYPE)
goto_point name_help(index)
See also POINT
(command,help): HELP [name [help_type]]
We recommend you learn the function keys and the following commands
first:
help edit
help-class save
what-is quit
where-is file
Help will be presented to you in a pop-up window or in a newly created
buffer. For help on one of the above commands toggle the visible
cursor to the command line and type "help " followed by one of the
commands above. You may retrieve previously typed commands with the UP
arrow key.
Esc Cancels pop-up window,
Toggles the visible cursor to and from the command line
F1 Runs help menu or displays help on menu item.
F3 Quits help buffer
'?' Lists possible arguments to a command when the visible
cursor is on the command line
Space bar Completes a command argument when the visible cursor
is on the command line
Ctrl-A Toggles the visible cursor to and from the command line
(command,help): HELP-CLASS [help_class [help_type]]
Presents a list of the help items with class help_class and type
help_type. For a list of the help classes, type "HELP-CLASS ?" on the
command line. Select a help class and then type "?" for a list of the
help types or just press ENTER (no help_type) to select any help type.
Once the help item has been selected a buffer is created and the help
text is inserted.
(command,help): HELP2-CLASS [help_class [help_type]]
Returns a HELP command string to execute. Help item is selected by
class and type. This command is intended to be used from within
"slick.mnu".
(command,help): HELP-COMMAND [command]
Creates a buffer and inserts help for the command specified. Lists
all keys that invoke the command specified.
(misc,language): IF
The syntax of the SLICK language IF statement is:
IF expression THEN statements
{ELSEIF expression THEN statements}
[ELSE statements]
ENDIF
Example
if x<y then a=1 endif
if x='a' then
y=1
elseif x='b' then
y=2
elseif x='c' then
y=3
else x='d' then
y=4
endif
(command,search): I-SEARCH
Starts an incremental search. Searching takes place as characters are
typed. A long search may be stopped by pressing Ctrl-Break. The
following keys take on a different definition during an incremental
search:
Ctrl-R Searches in reverse for next occurrence of search
string
Ctrl-S Searches forward for next occurrence of search
string
Ctrl-T Toggles regular expression pattern matching on/off. For
help on regular expressions, see / command.
Ctrl-W Toggles word searching on/off. See the WORD-CHARS
command for changing the definition of a word.
See also REVERSE-I-SEARCH, L, /, C
(misc,language): INCLUDE string_constant
Includes the file specified in string_constant for compiling. If
string_constant does not specify a path, the SLICK translator will look
in the same directory of the main source file. Otherwise, the path
specified by string_constant is searched. If the file is not found,
the SLICK translator will look for the include file by concatenating
the path specified by the SLICKINCLUDE environment variable to
string_constant. Currently, the SLICKINCLUDE environment variable may
only contain one path. Include files may be nested.
(command,mark): INDENT-MARK
Indents the marked text to the first tab stop not equal to one.
Supports line mark only. Indenting will be with tab or space
characters depending upon the indent style (CONFIG, "File extension
setup...", select an extension, "Indent with tabs"). Lines of text may
be marked with the MARK-LINE command (Alt-L).
See also UNINDENT-MARK
(command,misc): INDENT-WITH-TABS [Y|N]
If yes, the indent caused by invoking an ENTER key command or a
reformat paragraph command indents with tab characters. The
INDENT-WITH-TABS command only affects the current buffer. To set the
default indent style for specific file extensions, use the CONFIG menu
(CONFIG, "File extension setup...", select an extension, "Indent with
tabs")
(built-in,name): INDEX_CALLABLE(index)
Returns index into the name table of the module that the procedure
or command corresponding to index is linked. If index is invalid or
does not correspond to a procedure or command, 0 is returned.
Example
index=find_index('upcase-filter')
if not index_callable(index) then
message 'upcase-filter name in name table but not linked to module'
else
message 'upcase-filter is defined in module 'name_name(index)
endif
See also CALL_INDEX
(built-in,keyboard): INDEX2KEY(index)
Converts key table index into the string representation of
keys returned by GETKEY(), TESTKEY, and LASTKEY().
See also GETKEY, TESTKEY, LASTKEY, RAW_LASTKEY, CALL_KEY,
KEY2NAME, KEY2INDEX, LIST_BINDINGS, KEYTAB_INDEX,
SET_KEYTAB_POINTER
(built-in,file): INSERT_FILE_LIST command_line
Inserts a file list of the files specified with columns for size, date,
time, attributes, and name.
command_line has the following syntax:
{filespec | ['-' | '+' option_letters]}
option_letters may be 'H','S','A','D','P','T' with the following
meaning.
H Include hidden files (defaults to OFF)
S Include system files (defaults to OFF)
A Include archive files (defaults to OFF)
D Include directory files (defaults to OFF)
P Append path (defaults to OFF)
T Tree file list (defaults to OFF)
Note: There is an R option for read only files which
defaults to off. However, read only files will always
be included in file matching due to operating system
limits of DOS and OS/2.
filespec may contain operating system wild cards such as '*' and '?'.
If filespec is not specified, current directory is used.
Example
insert_file_list '\*.*" /* List just root directory with */
/* directories. */
insert_file_list '+tp \*.*" /* List all files. Append paths. */
(command,keyboard): INSERT-KEYDEF
Inserts SLICK source code for the binding of the key(s) you type.
(built-in,misc): INSERT_LINE line
Inserts line into current buffer after the current line and places
the cursor after the last character of line.
See also GET_LINE, REPLACE_LINE, DELETE_LINE
(command,keyboard): INSERT-MACRO kbd-macro-name
Runs the external command 'listmacs.s'. Inserts SLICK source code
representing the keyboard macro you specify into the current buffer.
Example
insert-macro last-kbd-macro
See also LIST-SOURCE, LIST-MACROS, LIST-KEYDEFS, LIST-CONFIG
(built-in,name): INSERT_NAME(name, type [,info])
Inserts name into name table with type and optional info. The index of
the new name table entry is returned if successful. Otherwise 0 is
returned and RC is set INTERPRETER_OUT_OF_MEMORY_RC and message will
get displayed after macro finished unless CLEAR_MESSAGE is called.
Valid types are listed in "slick.sh" and have the suffix "_TYPE".
Internal name types may not be inserted except for KEYTAB_TYPE. If the
type of name given is KEYTAB_TYPE, space is allocated for the new key
table.
See also NAMES, FIND_INDEX, NAME_MATCH, NAME_NAME, NAME_TYPE,
NAME_INFO, NAME_HELP, SET_NAME_HELP, FIND_LINK, CALL_LINK,
SET_NAME_INFO, NAME_CLASS, SET_NAME_CLASS, DELETE_NAME
(built-in,misc): INSERT_STATE()
Returns '1' if insert mode on. Otherwise '0' is returned.
Example
cursor_command
/* set insert mode on. */
if not insert_state() then insert_toggle endif
keyin 'insert these characters into the command line'
See also INSERT_TOGGLE
(command,misc): INSERT-TOGGLE
Toggles insert mode on/off. Normally the cursor shape is smaller when
in over-write mode. When in insert mode, characters are inserted at
the cursor position. When in over-write mode, the characters at the
cursor position are replaced.
(built-in,misc): INSERT_TOGGLE
Toggles insert mode on/off. Normally the cursor shape is smaller when
in over-write mode. When in insert mode, characters are inserted at
the cursor position. When in over-write mode, the characters at the
cursor position are replaced.
Example
cursor_command
/* set insert mode on. */
if not insert_state() then insert_toggle endif
keyin 'insert these characters into the command line'
See also INSERT_STATE
(built-in,misc): INT86X(int_num,ax bx cx dx si di cflag,ds es)
Calls DOS interrupt int_num with the registers given. Not all
registers need to be specified. The registers that are specified must
be in the order shown above. A string is returned with all the
registers in the format:
ax bx cx dx si di cflag,ds es
Example
defproc get_time()
parse value int86x(0x21,0x2c00,'') with ax bx cx dx .
hours= cx%256
minutes= cx & 0xff;
seconds= dx%256;
hundredths = dx & 0xff;
return(hours':'minutes':'seconds'.'hundredths)
defproc read(fh,var buffer,count)
if length(buffer)<count then
buffer=substr('',1,count)
endif
regs=0x3f00 fh 0 var_ofs(buffer)
segregs=var_seg(buffer)
parse value int86x(0x21,regs,segregs) with ax . . . . . cflag','
if cflag then
return(-ax)
endif
return(ax)
See also VAR_OFS, VAR_SEG
(misc,language): INTERNAL-VARIABLES
Internal variables are variables that belong to the SLICK editor. The
possible scope of an internal variable is BUFFER, VIEW, WINDOW, and
GROUP. Internal variables may not be used as call by reference
parameters.
To access an internal editor variable, specify one of the names below
and prefix it with a dot.
Name Description Scope
__________________________________________________________________
buf_name_color Color of buffer name (WINDOW)
mono_buf_name_color Mono color of buffer name (WINDOW)
box_color Color of window border (WINDOW)
mono_box_color Mono color of window border (WINDOW)
message_color Color of message (WINDOW)
mono_message_color Mono color of message (WINDOW)
fkeytext_color Color of fkeytext (WINDOW)
mono_fkeytext_color Mono color of fkeytext (WINDOW)
window_color Color of window text (WINDOW)
mono_window_color Mono color of window text (WINDOW)
command_color Color of command line (WINDOW)
mono_command_color Mono color of command line (WINDOW)
mark_color Color of text mark (WINDOW)
mono_mark_color Mono color of text mark (WINDOW)
subtitle_color Color of window subtitle (WINDOW)
mono_subtitle_color Mono color of window subtitle (WINDOW)
cursor_color Color of cursor mark (WINDOW)
mono_cursor_color Mono color of cursor mark (WINDOW)
window_style Determines window border (WINDOW)
style and corner characters
to be used. There is further
explanation below.
window_overlap Indicates whether this window (WINDOW)
overlaps any other window and
optionally specifies flags
for windows with selection
characters, list selection bar,
or word selection bar. The flags
are in "slick.sh" and shown below:
WINDOW_OVERLAP=1 Window overlaps other windows.
MENU_OVERLAP=2 Window has selection characters.
Selection characters are surrounded
with the character '^'.
Uses cursor color.
LIST_OVERLAP=4 Window has line selection bar.
Uses mark color.
WORD_OVERLAP=8 Window has word selection bar.
Uses mark color.
DISPLAY_COLOR_OVERLAP=16 Window has colored text. Uses cursor
color.
These window_overlap flags are used
in conjunction with the WINDOW,UP, and
DOWN primitives to implement menus and
selection lists.
window_x The top left x position of (WINDOW)
window (0..screen_width()-2)
window_y The top left y position of (WINDOW)
window (0..screen_height()-3)
window_height Window height (WINDOW)
(1..screen_height()-2)
window_width Window width (WINDOW)
(2..screen_width())
window_id Window id. (WINDOW)
left_edge Column scroll position (VIEW)
0..255-1.
cursor_x Text cursor x position (VIEW)
0..screen_width()-1
cursor_y Text cursor y position (VIEW)
0..screen_height()-3
line Line number (VIEW)
Noflines Number of lines in file (BUFFER)
col Column position within (VIEW)
current line. 1..255
buf_name Name of buffer (BUFFER)
Nofviews Number of views of buffer (BUFFER)
modify Non zero indicates buffer (BUFFER)
has been modified
buf_id buffer id (BUFFER)
margins String containing left,right (BUFFER)
and new paragraph margins.
1..254
tabs String containing up to 30 (BUFFER)
tab stops. See TABS command
for example input strings.
subtitle Window subtitle (WINDOW)
mode_name Name of current mode (BUFFER)
group_id Group id (GROUP)
buf_width If non-zero, width of (BUFFER)
record file.
word_wrap_style Flags for word wrap on/off (BUFFER)
and paragraph justification.
1 Unjustify on/off flag. Justify flag overrides this flag.
2 Word wrap on/off flag.
4 Justify flag.
show_tabs options for tab formatting (BUFFER)
0 Expand tabs to spaces.
1 Display tab characters without expanding them.
2 Expand tabs to spaces but display first character
as a tab character instead of a space.
indent_with_tabs 0,1 Indicates whether (BUFFER)
the editor should indent
with tabs or spaces.
The following internal variables are read-only:
window_id, left_edge, Noflines, Nofviews, buf_id, group_id, buf_width
The .window_style variable determines the window borders and the corner
characters. The first 8 bits of the .window_style variable is the
window border style which may have the follow values.
0 No border. Make the window to big to draw the borders
instead of using this border style.
1 ┼ All sides are single line.
2 ╬ All sides are double line.
3 ╪ top/bottom sides are double, left/right sides are single
4 ╫ top/bottom sides are single, left/right sides are double
The corner flags constants for the .window_style variable
are defined in "slick.sh". There meaning is listed below.
TL_MASK Top left mask for turning on or off all
flags for top left corner.
TL_LEFT_MASK Join top left corner with left window ╤
TL_ABOVE_MASK Join top left corner with above window ╞
TR_MASK Top right mask for turning on or off all
flags for top right corner.
TR_RIGHT_MASK Join top right corner with right window ╤
TR_ABOVE_MASK Join top right corner with above window ╡
BR_MASK Bottom right mask for turning on or off all
flags for bottom right corner.
BR_RIGHT_MASK Join bottom right corner with right window ╧
BR_BELOW_MASK Join bottom right corner with below window ╡
BL_MASK Bottom left mask for turning on or off all
flags for bottom left corner.
BL_LEFT_MASK Join bottom left corner with left window ╧
BL_BELOW_MASK Join bottom left corner with below window ╞
(misc,help): INVOCATION
s [options] file1 [options] file2 ...
options may be any one of the following:
-q Do not display version information.
-k Extended keyboard F11,F12. Do not
use the -k option unless you are sure
your BIOS has support for the extended
keyboard calls.
-y kstart ksize Specifies start and size of extended memory. If
you have EMS memory, SLICK will automatically
use it. SLICK will not use extended memory unless
you specify this option. Extended memory performs
about the same as EMS memory.
-sh height Screen height.
-sw width Screen width.
-sc char_height Character pixel height. If you have problems
with the cursor shape, try using this option.
-st state_ksize Specifies the maximum amount of swappable state
file data in SLICK.STA to be kept in memory. -1
specifies no limit. 0 specifies that the editor
preload all state file data.
-sm max_file_size
Specifies the maximum amount of buffer text
in megabytes that may be edited at one time. The
default is 2 megabytes (requires 6.5k of memory).
For DOS and OS/2, this number may not be higher
than 160 (requires 524k of memory) megabytes. For
DOS, we recommend you use this option if you plan
on editing more than 2 megabytes worth of files.
For OS/2, it is unnecessary to specify this option.
-x pcode_name Alternate state file (.sta) or pcode
file (.sx).
-b Indicates that slick was invoked via
"slk.bat" batch program.
-h help_file Filename with path containing help.
-m menu_file Filename with path containing menus.
-p command Execute command and exit.
-r command Execute command and remain resident.
file1 file2 Files to edit. May contain '*' and '?'
wild cards
-#command Execute command on active buffer. For example,
"s test.c -#bottom-of-buffer" places the cursor
at the end of test.c.
+ or -L Turn on/off Load entire file switch.
+ or -S Turn on/off unmodified block swapping to spill file.
+nnn Load binary file(s) that follow in record width nnn.
+T [buf_name] Start a temp buffer with name buf_name.
+ or -E Turn on/off expand tabs to spaces switch. Default
is off. Currently the POINT function does not
supported tabbed files that are expanded.
+ or -D Turn on/off memory buffer name search. Disk file
search.
+B buf_name Look in memory only for buffer with name buf_name.
If you need to edit a file which contains space characters, place
double quotes around the name.
Note: To avoid having to type in options such as -k, -y, -h, and -m,
Define an environment variable called SLICK and set it to the
options you always use. For example, adding the line
"set SLICK=-k -y 1024 1536" tells SLICK to use extended keyboard
calls and use 1.5 megabytes of extended memory starting after
the first megabyte of memory.
Technical note:
The procedure DEFMAIN in "main.s" processes the -b, -h , -m, -p,
and -r options. The editor processes the -q, -k, and -x options
before DEFMAIN gets control. All remaining parameters and
options are passed to the EDIT command.
Example
s autoexec.bat config.sys - Edit two files
s "this is.c" - Edit a file with a space character
s -y 1024 1536 autoexec.bat config.sys
- Edit two files and use 1.5 megabytes
of extended memory starting after
the first megabyte of memory.
s test.c -#1000 - Edit test.c and go to line 1000
s orders -#bottom-of-buffer -#/invoice/-
- Edit orders file, go to bottom of
buffer, and search backward for
"invoice".
s +70 test.exe - Edit binary file test.exe in record
width 70.
s -r list \ - Start the file manager
s -p shell - Start the slick shell
s -xrich.sta autoexec.bat - Specify different state file and
edit the file autoexec.bat
s -xrich.sta -hc:\slick\slick.doc -mc:\slick\slick.mnu
- Specify state, help, and menu files
When SLICK is invoked it concatenates the value of the environment
variable SLICK before the command line you specify.
Example
c:\slick>set SLICK=-m c:\slick\user.mnu
c:\slick>s test.c
The above sequence is identical to
c:\slick>s -m c:\slick\user.mnu test.c
(command,misc): JOIN-LINE
Joins the next line to the current line at the cursor position.
Leading blanks on the next line are removed.
(command,misc): JUSTIFY [Y|N|U]
The JUSTIFY command affects the way the editor handles spaces between
words when formatting paragraphs. By default the REFLOW-PARAGRAPH and
REFLOW-MARK commands place one space between words accept after the
punctuation characters ".?!" which get two spaces. If you want the
editor to respect the spaces you have inserted between the words, enter
the argument N. If you want the paragraph to be left and right
justified, enter the argument Y. The JUSTIFY command only affects the
current buffer. To set the default JUSTIFY style for a specific file
extension, use the CONFIG menu (CONFIG, "File extension setup...",
select an extension, "Justify").
IMPORTANT
If JUSTIFY is set to N, the save options should be set to -S so
that trailing spaces are not stripped from the end of each line
when a file is saved. See SAVE-OPTIONS command.
See also WORD-WRAP
(command,keyboard): KBD-MACRO-END-EXECUTE
Ends definition of a keyboard macro if one is being defined and
executes the last keyboard macro defined.
See also START-KBD-MACRO, END-KBD-MACRO, NAME-MACRO,
KBD-MACRO-TOGGLE
(command,keyboard): KBD-MACRO-TOGGLE
Starts or ends definition of a keyboard macro.
See also START-KBD-MACRO, END-KBD-MACRO, NAME-MACRO,
KBD-MACRO-END-EXECUTE
(misc,language): KEY-NAMES
A key name may be either a string literal of length one or a key
constant. See STRINGS, for information on string literals. The
acceptable key constants are listed below.
PAD_PLUS, PAD_MINUS, PAD_STAR
LEFT, RIGHT, UP, DOWN, PGDN, PGUP C_LEFT, C_RIGHT, C_PGDN, C_PGUP
BACKSPACE, ENTER C_BACKSPACE, C_ENTER
HOME, END, INS, DEL, ESC C_HOME, C_END
TAB, S_TAB A_MINUS, A_EQUAL
F1, F2, ...F10,F11,F12 A_F1, A_F2, ...A_F10,A_F11,A_F12
C_A, C_B, ...C_Z A_A, A_B, ...A_Z
C_F1, C_F2, ...C_F10,C_F11,C_F12 A_1, A_2, ...A_0
S_F1, S_F2, ...S_F10,S_F11,S_F12 C_2, C_PRTSC
OS/2 only
C_UP, C_DOWN, C_INS, C_DEL PAD_5, A_PAD_PLUS, C_PAD_PLUS, C_MINUS
A_SLASH,A_BACKSPACE, A_COMMA A_DOT, A_SEMICOLON, A_QUOTE
A_LEFT_BRACKET, A_RIGHT_BRACKET A_TAB, C_TAB, A_BACKSLASH, A_ENTER
C_LEFT_BRACKET, C_RIGHT_BRACKET
PS/2 keyboards only
A_LEFT, A_RIGHT, A_UP, A_DOWN A_INS, A_HOME, A_END, A_DEL
A_PGUP, A_PGDN C_PAD_SLASH, A_ALT, C_CTRL
Example
def A_X=safe_exit
defmacro dup_line= A_U A_L A_C A_U
def \0 - \255=nothing
(command,misc): KEY-NOT-DEFINED
The editor invokes this command when the user presses a key that has no
definition.
(built-in,keyboard): KEY2INDEX(key)
Converts the string representation of key returned by GETKEY(),
TESTKEY(), and LASTKEY() into a key table index which can be used by
the functions KEYTAB_INDEX, SET_KEYTAB_POINTER, or INDEX2KEY.
Example
key=getkey()
mode_keys= find_index('mode-keys',KEYTAB_TYPE);
root_keys= find_index('root-keys',KEYTAB_TYPE);
index=keytab_index(root_keys,mode_keys,key2index(key))
/* name could be type nothing, proc, command, macro, or key table. */
message 'Key is bound to 'name_name(index)
See also GETKEY, TESTKEY, LASTKEY, RAW_LASTKEY, CALL_KEY,
KEY2NAME, INDEX2KEY, LIST_BINDINGS, KEYTAB_INDEX,
SET_KEYTAB_POINTER
(built-in,keyboard): KEY2NAME(key)
Converts the string representation of key returned by GETKEY(),
TESTKEY(), and LASTKEY() into a key name.
Example
key=getkey()
message 'The key pressed was 'key2name(key)
See also GETKEY, TESTKEY, LASTKEY, RAW_LASTKEY, CALL_KEY,
KEY2INDEX, INDEX2KEY, LIST_BINDINGS, KEYTAB_INDEX,
SET_KEYTAB_POINTER
(built-in,misc): KEYIN string
Inserts or overwrites characters into the command line or text area
depending on the insert state and the cursor position.
(command,misc): KEYIN-BUF-NAME
Inserts or overwrites the buffer name into the command line or text
area depending on the insert state and the cursor position.
(command,misc): KEYIN-MATCH-PAREN
Inserts one of the end parenthesis ], }, or ) and then temporarily
places the cursor on the matching begin parenthesis for a short period
of time.
See also FIND-MATCHING-PAREN
(built-in,keyboard): KEYTAB_INDEX(root_keys_index,mode_keys_index,
key_index, [,'U'])
Returns name table index bound to the key corresponding to
key_index. The fourth parameter may be set to 'U', to return the
index of the key table used. If the mode key table has a non zero
binding for the key corresponding to key_index this index is
returned. Otherwise the root key table binding is returned.
Example
key=getkey()
root_keys_index= find_index('root-keys',KEYTAB_TYPE);
mode_keys_index= find_index('mode-keys',KEYTAB_TYPE);
index=keytab_index(root_keys_index,mode_keys_index,key2index(key))
/* Display information about the binding to this key. */
message 'name='name_name(index)' type='name_type(name)
(command,mark): KILL-BUFFERS [number]
Sets the maximum number of clipboards. Clipboard text may be retrieved
by the command BOTH-YANK or BOTH-LIST-YANK. The BOTH-LIST-YANK command
allows you to select any clipboard for pasting, not just your last.
(command,mark): KILL-MARK
Deletes and copies visible marked text to the clipboard. If no text is
marked, the current line is deleted and copied to the clipboard. All
clipboards are stored in the ".killed" buffer. The last clipboard may
by retrieved by the BOTH-YANK command (Ctrl-Y). Previous clipboards
may be retrieved with the BOTH-LIST-YANK command (Ctrl-X Ctrl-Y). The
maximum number of clipboards may be set by the command KILL-BUFFERS.
Text may be marked with one of the commands MARK-CHAR (Alt-Z),
MARK-LINE (Alt-L), or MARK-BLOCK (Alt-B).
See also COPY-TO-CLIPBOARD, BOTH-LIST-YANK, BOTH-YANK
(built-in,misc): LAST_INDEX([new_value])
Returns index of last command executed by a key or the built-in
CALL_KEY function. If new_value is given, the last command index is
set to new_value.
See also PREV_INDEX
(command,keyboard): LAST-KBD-MACRO
The last keyboard macro defined may be executed by the command
LAST-KBD-MACRO.
(built-in,keyboard): LASTKEY()
Returns a string representation of the last key returned from GETKEY or
TESTKEY. For ASCII keys a string of length 1 is returned except for
C_ENTER, C_BACKSPACE, ENTER, TAB, BACKSPACE, and ESC. For these
special keys and extended keys like A_L, a string of length 2 is
returned. This separation allows the control keys C_J, C_H, C_M, and
C_I to have a different binding from the keys listed above.
Example
key=getkey()
message 'The key pressed was 'key2name(lastkey())
See also GETKEY, TESTKEY, RAW_LASTKEY, CALL_KEY, KEY2NAME,
KEY2INDEX, INDEX2KEY, LIST_BINDINGS, KEYTAB_INDEX,
SET_KEYTAB_POINTER
(built-in,string): LASTPOS(needle[,haystack[,start[, options]]])
Returns the position (1..length(haystack)) of the last occurrence of
needle in haystack. If needle is not found, 0 is returned. The start
parameter specifies the position searching begins. If not specified
searching begins at end of haystack. start must be in the range
1..MAX_WHOLE_NUMBER. Multiple options may be specified with the
following meaning:
'I' Ignore case.
'R' Interpret search string needle as regular expression. See
help on / command for syntax of regular expressions.
Example
lastpos('a','aca') == '3'
lastpos('aa','aaa',2) == '2'
lastpos('W\cord','word test',3,'IR')=='2'
Calling the LASTPOS function with one parameter allows you to retrieve
match group information. Specifying 'S' followed by a match group
number 0-9 (i.e. 'S0') will return the start position of that match
group. 1 is returned if that match group was not found. If 'S' is not
followed by a number, the start position of the entire string found is
returned. Specifying a match group number 0-9 will return the match
length of that match group. 0 is returned if that match group was not
found. A value of '' will return the match length of the entire string
found.
Example
get_line line
word_sep='([~a-zA-Z0-9_$]|^|$)'
i=lastpos(word_sep'{if|then|while}'word_sep,line,'','r')
if not i then
message 'Match not found'
return(1)
endif
word=substr(line,lastpos('S0'),lastpos('0'))
The POS and LASTPOS function return the same match group information.
For example, pos('S0')==lastpos('S0') will always be true.
See also POS
(built-in,cursor): LEFT
Moves the text cursor one position to the left. If the visible cursor
is in the command line area the visible cursor is not moved. When the
left edge is hit, the text area is smooth scrolled or center scrolled.
See SCROLL_STYLE.
See also RIGHT
(built-in,string): LENGTH(string)
Returns the number of characters in string.
Example
length('abc') == 3
length('') == 0
(command,menu): LEVEL2-MENU menu_name [sticky]
Runs the menu menu_name. If the menu returns a command to execute, RC
is set to the command. Otherwise RC is set to a numeric error code.
When the sticky option is given, the menu will not go away after
returning from a subsequent menu level. The MENU command calls the
LEVEL2-MENU command and executes the return code.
See also MENU, RETURN
(command,cursor): LINE-TO-TOP
Places current line at top of window.
(command,file): LIST [command_line]
Creates a buffer and inserts a tree directory list of the files
specified with columns for size, date, time, attributes, and name. The
mode is changed to fileman mode. When in fileman mode F1 becomes help
on file management keys and F10 brings up a menu of file management
commands.
command_line has the following syntax:
{filespec | ['-' | '+' option_letters]}
option_letters may be 'H','S','A','D','P','T' with the following
meaning.
H Hidden files. Default is off.
S System files. Default is off.
A Archive files. Default is off.
D Directory files. Default is off.
P Append path. Default is on.
T Tree file list. Default is on.
filespec may contain operating system wild cards such as '*' and '?'.
If filespec is not specified, the current directory is used.
Example
list c:\ - List all files on drive C.
list - List all files starting from the current
directory.
list +HS c:\ - List all files on drive C including
hidden and system files.
(built-in,keyboard): LIST_BINDINGS var key_index,var name_index_found,
var keys_used,root_keys_index,
mode_keys_index,match_index
Finds all bindings to a name table index.
INPUTS
key_index Previous key table index. -1 start list
root_keys_index Name table index of root key table.
Usually 'root-keys'
mode_keys_index Name table index of mode key table.
Usually 'mode-keys'
match_index Name table index binding to find.
Example
mode_keys= find_index('mode-keys',KEYTAB_TYPE);
root_keys= find_index('root-keys',KEYTAB_TYPE);
index=keytab_index(root_keys,mode_keys,key2index(key))
/* name could be type nothing, proc, command, macro, or key table. */
message 'Key is bound to 'name_name(index)
See also GETKEY, TESTKEY, LASTKEY, RAW_LASTKEY, CALL_KEY,
KEY2NAME, KEY2INDEX, INDEX2KEY, KEYTAB_INDEX,
SET_KEYTAB_POINTER
(command,buffer): LIST-BUFFERS
Creates a pop-up window with a selection list of the names of all
buffers with a name. Press ENTER to edit one of the buffers. Command
is self explanatory.
(command,misc): LIST-CONFIG
Runs the external command 'listcfg.s' with no arguments. This command
creates a new buffer and inserts SLICK source code representing the
configuration of insert mode, colors, search case sensitivity, cursor
shape, cache size, spill file path, scroll style, language syntax
options, file load/save options, tabs, margins, and more. For
all variables that start with the four letters 'def_', an assignment
statement (variable= current value) will be inserted into this buffer.
See also LIST-SOURCE, LIST-MACROS, INSERT-MACRO, LIST-KEYDEFS
(command,keyboard): LIST-KEYDEFS
Runs the external command 'listkeys.s' with no arguments. This command
creates a new buffer and inserts SLICK source code representing all the
key definitions including key definitions for all modes. You may want
to print this file and use it as a reference of your SLICK key
definitions.
See also LIST-SOURCE, LIST-MACROS, INSERT-MACRO, LIST-CONFIG
(command,keyboard): LIST-MACROS
Runs the external command 'listmacs.s' with no arguments. This command
creates a new buffer and inserts SLICK source code representing all
the keyboard macros you have defined.
See also LIST-SOURCE, INSERT-MACRO, LIST-KEYDEFS, LIST-CONFIG
(command,misc): LIST-SOURCE
This command creates a new buffer called 'userdefs.s' and inserts SLICK
source code representing your current configuration. The external
commands 'listkeys', 'listmacs', and 'listcfg' are executed. The most
important use of this command is to allow you to easily update yourself
to a new version of SLICK. Following these steps will make
updating to a new version of SLICK much easier:
cd c:\slick - Change to directory containing the SLICK files.
s - Run the old version of SLICK
list-source - List the source code for your configuration
save - Save the source code
a: - Change to the drive containing the install program
install - Install the new version of SLICK
c: - Change to the drive containing the SLICK files.
cd c:\slick - Change to directory containing the SLICK files.
s - Run the new version of SLICK.
userdefs - Run the batch program created by the LIST-SOURCE
command to setup your configuration.
write-state - Run the WRITE-STATE command (CONFIG, "Save
configuration...").
See also LIST-MACROS, INSERT-MACRO, LIST-KEYDEFS, LIST-CONFIG
(command,misc): LOAD [modules]
Compiles (if necessary) and loads the modules specified. If the module
is already loaded it is replaced. If no module is specified and the
current buffer has the extension ".s" or ".cmd", the current buffer is
saved (if necessary) and loaded.
(built-in,misc): LOAD modules[,load_option]
load_option defaults to 'L' and may be 'L','R', or 'U'. Modules name
extensions are replaced with '.sx'.
If load_option=='L' the modules specified are loaded if the module is
not already loaded. If any of the modules are already loaded, loading
stops and RC is set to MODULE_ALREADY_LOADED_RC. RC may also be set to
INTERPRETER_OUT_OF_MEMORY_RC or a file I/O RC. Upon successful
completion, RC is set to 0.
If load_option=='R' the modules specified are loaded after the SLICK
interpreter stops. If any of the modules are already loaded, they are
unloaded before the new module is loaded. RC may also be set to
INTERPRETER_OUT_OF_MEMORY_RC immediately after LOAD is executed. Upon
successful completion, RC is set to 0. If the any of the modules can
not be unloaded, the message "Can't remove module" will be displayed.
If load_option=='U' the modules specified are unloaded. If any of the
modules can not be unloaded because they are running, unloading stops
and RC is set to CANT_REMOVE_MODULE_RC. Upon successful completion, RC
is set to 0.
See also UNLOAD
(built-in,window): LOAD_FILES params
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
Params may contain file names and the following options
name Find the buffer specified or load the file
+ or -L Turn on/off load entire file switch. Default is off.
+ or -S Turn on/off unmodified block swapping to spill file.
Default is off.
+nnn Load binary file(s) that follow in record width nnn.
+T [buf_name] Start a temp buffer with name buf_name.
+ or -E Turn on/off expand tabs to spaces switch. Default is
off. Only tabs of increments of 8 are supported.
+ or -D Turn on/off memory buffer name search. Disk file search.
+ or -C Turn copy view switch on or off. Default is off.
+V [view_id] Insert a copy of the file view specified.
+I Insert a window with no views.
+ or -W Insert a window for each file that follows.
+ or -A Insert views into active window only.
+B buf_name Look in memory only for buffer with name buf_name.
+H Activate the Hidden window group
+ or -G Turn switch group on/off. Affects +B and name params.
+ or -R Turn switch replace current buffer on/off.
The options above that only show a plus sign will also take a minus
sign. However there function will remain the same.
Here is a more detailed description of the options.
+ or -L Turn on/off load entire file switch. Default is off.
Entire file is loaded and unmodified blocks are
swapped to spill file so that file handle is freed.
Used to speed up file scrolling on slow disk.
Used to free file handles or prevent file sharing problems.
Used to guard against loosing files loaded from
remote system.
+ or -S Turn on/off unmodified block swapping to spill file.
When on, unmodified blocks are spilled to spill file.
Used for editing remote files across slow links or
EMS/extended memory support. Once a block is loaded
from a slow access link, if it needs to be spilled, it
is written to your local hard disk or EMS/extended
memory.
+nnn Load binary file giving each line nnn characters.
Used for editing binary or record files.
+T [buf_name] Start a temp buffer with name buf_name. buf_name
is expanded to absolute form and stored in the internal
variable ".buf_name".
+ or -E Turn on/off expand tabs to spaces switch. Default is
off. Only tabs of increments of 8 are supported.
+ or -D Turn on/off memory buffer name search.
When on, files are loaded from disk regardless if
there is a copy already in memory. It is wise to
rename the copy after loading it to prevent saving
the wrong file.
+ or -C Turn copy view switch on or off. Default is off.
When a file name is specified and a buffer exists
with the same name this option determines whether
a new view (+C) of the buffer is inserted into the current
window or the view of the buffer found is activated.
If the view is in a different window group like the hidden
window group, the view is always copied unless the +G
option is used.
+V [view_id] Insert a copy of the file view specified into the
windows specified. If no view is specified the current
view is copied.
+I Insert a window with no views. Window is deleted if
no views are inserted.
+ or -W Insert a window for each file that follows.
+ or -A Insert views into active window only.
+B buf_name Look in memory only for buffer with name buf_name. If
buffer is not found, RC is set to FILE_NOT_FOUND_RC.
No view is inserted if buffer is not found. Buffer
name search is case insensitive for file systems like
DOS which are case insensitive. Buf_name must be in
absolute form (Full path spec).
+H Activate the Hidden window group. The Hidden window
group is used to hold temporary files that the user
does not want to look at. Usually there is only one
window in the hidden window group. The editor will
exit when the only window group left is the hidden
window group.
+ or -G Turn switch group on/off. Affects +B and name params.
Normally when the parameter "+B buf_name" is
given, buffer views found outside the active window
group are copied into the current window even if
the "+C" switch is not given. To enable window group
switching specify +G.
+ or -R Turn replace current buffer switch on/off. When on
the files that follow will replace the current buffer.
A view holds the information necessary for the editor to remember your
location and scroll postion in a buffer. Each window has a ring of
views to buffers. When you have more than one window looking at the
same buffer. The windows have different views of that buffer.
QUIT_VIEW removes the active view from the window view ring. The
previous view becomes the new active view. When QUIT_VIEW is executed
and only one view exists in the active window, the window is removed
from the active window group. If no more windows exist the active
window group is removed and the previous window group is activated.
The editor exits when the only window group left is the hidden window
group. The hidden window group holds the command retrieve file
".command".
Example
/* insert a temp buffer with no name into all the windows */
/* of the current window group. */
load_files '+t'
/* insert a temp buffer into the active window */
load_files '+a +t'
/* insert a view of the disk file "test.c" into all the windows */
/* of the current window group. */
load_files '+d test.c'
/* insert a view of the disk file "test.c" into the active */
/* window only. */
load_files '+a +d test.c'
/* insert a view of the disk file "test.c" into a new window */
load_files '+i +a +d test.c'
/* insert a view of the retrieve buffer ".command" into all the */
/* windows of the current window group. */
load_files '+c +b .command'
/* insert a view of the retrieve buffer ".command" into all the */
/* windows of the current window group. RETRIEVE_VIEW_ID defined */
/*"slick.sh" */
load_files '+c +v 'RETRIEVE_VIEW_ID
/* Activate the retrieve buffer ".command" and the hidden */
/* window group. Execute the next-group command to leave the */
/* hidden window group. */
load_files '+g +b .command' or load_files '+h +b .command'
/* insert a copy of the active view into the current window. */
load_files '+v'
; Case 1 no buffer has name absolute(filename).
; Then Filename is loaded from disk and a view is inserted
; into all the windows of the current window group.
;
; Case 2 buffer exists with name absolute(filename) in the
; current window group.
; Then The first view of buffer found in current window group
; is activated.
;
; Case 3 buffer exists with name absolute(filename), but not in
; the current window group.
; Then A view of buffer is inserted into all the windows
; of the current window group.
;
load_files 'filename'
See also GET_VIEW_ID, ACTIVATE_VIEW, NEXT_VIEW, PREV_VIEW, QUIT_VIEW,
NEXT_WINDOW, PREV_WINDOW
(command,file): LOAD-OPTIONS +L|-L +S|-S +E|-E
The LOAD-OPTIONS command specifies the default switches used by the E
or EDIT commands. If no options are given, the current option settings
are displayed. If you want different LOAD-OPTIONS for different disk
drives, define an environment variable called SLICKLOAD and specify
each drive followed by the options. For example, "set SLICKLOAD= a: +L
b:+L" specifies preloading files from floppy drives A and B.
The option letters have the following meaning:
+ or -L Turn on/off load entire file switch.
+ or -S Turn on/off unmodified block swapping to spill file.
+ or -E Turn on/off expand tabs to spaces. Only supports
tab increments of 8.
(misc,language): LOCAL
Declares a variable of the scope "local". The scope of a local
variable is limited to the procedure (DEFPROC) or command (DEFC) it is
is defined in. Local variables are not initialized.
Syntax
DEFPROC ...
LOCAL
variable [',']
variable [',']
....
The comma is used to declare multiple local variables on one line.
(misc,language): LOOPS
The syntax for valid SLICK language loops are:
WHILE expression DO
statements
ENDWHILE
DO WHILE expression - REXX style loop
statements
END
LOOP
statements
ENDLOOP
DO FOREVER - REXX style loop
statements
END
FOR variable= expression TO expression [BY increment]
statements
ENDFOR
- REXX style loop
DO variable= expression TO expression [BY increment]
statements
END
Loops may be exited with the LEAVE primitive. The ITERATE primitive
may be used to skip to the top of a loop.
Example
search ':'
loop
if rc then
leave
endif
get_line line
say 'found match line='line
repeat_search
endloop
clear_message;pause
(built-in,string): LOWCASE(string)
Returns string converted to lower case.
Example
lowcase('ABc') == 'abc'
lowcase('ABC') == 'abc'
See also UPCASE
(command,mark): LOWCASE-MARK
Translates characters within visible mark into lower case. Text may be
marked with one of the commands MARK-CHAR (Alt-Z), MARK-LINE (Alt-L),
or MARK-BLOCK (Alt-B).
See also UPCASE-MARK
(command,misc): MA,MARGINS [left [right [new-paragraph]]]
Sets the left, right, and new paragraph margins. Each buffer has one
set of margins.
See also REFLOW-MARK, REFLOW-PARAGRAPH
(built-in,misc): MACHINE()
Returns 'PCDOSP' if running protect mode (OS/2 mode). Otherwise
'PCDOS' is returned.
(built-in,misc): MAKE modules
The date of the each module in modules is checked against the date of
the '.sx' file. If the '.sx' file does not exist or the source file
date is later the the '.sx' file, the command 'st -q -w '||source_name
is executed. If no extension is given '.s' is used. Any module name
with the extension '.sx' is not compiled. If MAKE does not find the
the source file, RC is set to FILE_NOT_FOUND_RC. If an error occurs
during compilation, RC is set to 1. If a DEFC for command ST is
defined, it should return '1' if an error occurs.
(command,misc): MAKE-PROJECT
The command MAKE-PROJECT (Alt-F5) invokes an external program specified
by the SLICK macro variable "def-make-project". For OS/2, the program
is executed in SLICK's concurrent process buffer. For DOS, you may
specify the amount of memory the command requires and SLICK will swap
enough of itself to extended/EMS memory or disk to invoke the program.
SLICK can shrink down to about 10k. The SET-VAR command "set-var
def-make-project" or the CONFIG menu item (CONFIG, "Make project
command") may be used to set the value the "def-make-project" variable.
Specify the amount of memory in kilobytes the program requires
(optional) followed by the program name and parameters.
See also COMPILE, XDOS
(command,search): MAKE-TAGS [-L] file1 [-L] file2 ...
This command runs the external macro "maketags.s". The make-tags
command builds a file called "tags.slk" which contains the names of C,
Pascal, Modula2, Clipper, and Assembly language procedures followed by
the file name. This information is used by the FIND-TAGS command to
quickly find one of your procedures. "tags.slk" is written into the
current directory. Multiple files with wild cards may be specified.
The -L option is used to specify a file that contains a list of file
names. The file manager WRITE-LIST command may be used to create a
list of file names. See "tags.s" for information on adding support for
other languages.
Example
make-tags *.c *.asm
make-tags f:\source\*.c - Create tag file for non-writable
drive this way.
make-tags -L list1 *.pas
See also FIND-TAG
(command,mark): MARK-BLOCK
Starts or extends the visible block. Used for processing columns of
text. The first MARK-BLOCK becomes the pivot point. If begin/end
(default) marking style is active, subsequent MARK-BLOCK calls will
mark the area between the pivot point and the cursor. If cut/paste
marking style is active the mark will be extended as the cursor moves
(See MARK-STYLE command). In this style, the second MARK-BLOCK call
"locks" the mark so that it does not extend as the cursor moves.
See also MARK-CHAR, MARK-LINE, MARK-STYLE
(built-in,mark): MARK_BLOCK [mark_id[,'C'|'E']]
Starts or extends the block mark specified. Used for processing
columns of text. The first MARK_BLOCK becomes the pivot point.
Subsequent MARK_BLOCK calls will mark the area between the pivot point
and the cursor. The second parameter specifies the marking style. A
value of 'C' specifies cut/paste style marking. In this style the mark
is extended as the cursor moves. The default style 'E' requires that
MARK_BLOCK be executed for the end of the text block as well as the
beginning.
See also MARK_CHAR, MARK_LINE
(command,mark): MARK-CHAR
Starts or extends the visible character mark. Used for processing
sentences of text which do not start and end on line boundaries. The
first MARK-CHAR becomes the pivot point. If begin/end (default)
marking style is active, subsequent MARK-CHAR calls will mark the area
between the pivot point and the cursor. If cut/paste marking style is
active the mark will be extended as the cursor moves (See MARK-STYLE
command). In this style, the second MARK-CHAR call "locks" the mark so
that it does extend as the cursor moves.
See also MARK-BLOCK, MARK-LINE, MARK-STYLE
(built-in,mark): MARK_CHAR [mark_id[,'C'|'E']]
Starts or extends the character mark specified. Used for processing
sentences of text which do not start and end on line boundaries. The
first MARK_CHAR becomes the pivot point. Subsequent MARK_CHAR calls
will mark the area between the pivot point and the cursor. The second
parameter specifies the marking style. A value of 'C' specifies
cut/paste style marking. In this style the mark is extended as the
cursor moves. The default style 'E' requires that MARK_CHAR be
executed for the end of the text area as well as the beginning.
See also MARK_BLOCK, MARK_LINE
(built-in,mark): MARK_LINE [mark_id[,'C'|'E']]
Starts or extends the line mark specified. Used for processing
complete lines of text. The first MARK_LINE becomes the pivot point.
Subsequent MARK_LINE calls will mark the area between the pivot point
and the cursor. A value of 'C' specifies cut/paste style marking. In
this style the mark is extended as the cursor moves. The default style
'E' requires that MARK_CHAR be executed for the end of the text area as
well as the beginning.
See also MARK_BLOCK, MARK_CHAR
(command,mark): MARK-LINE
Starts or extends the visible line mark. Used for processing complete
lines of text. The first MARK-LINE becomes the pivot point. If
begin/end (default) marking style is active, subsequent MARK-LINE calls
will mark the area between the pivot point and the cursor. If
cut/paste marking style is active the mark will be extended as the
cursor moves (See MARK-STYLE command). In this style, the second
MARK-LINE call "locks" the mark so that it does extend as the cursor
moves.
See also MARK-BLOCK, MARK-CHAR, MARK-STYLE
(built-in,search): MARK_MATCH [mark_id]
Unmarks the mark specified and then starts a character mark for mark
specified of the last string matched by one of the built-in functions
SEARCH or REPEAT_SEARCH.
See also MARK_LENGTH, SEARCH, REPEAT_SEARCH, SEARCH_REPLACE,
SAVE_SEARCH, RESTORE_SEARCH, SEARCH_CASE
(command,mark): MARK-STYLE ['E'|'C']
Selects the mark style to be used by the commands MARK-BLOCK,
MARK-LINE, and MARK-CHAR. If no parameters are specified, the current
mark style is returned. A value of 'E', as in the default
configuration, specifies that marking an area of text requires both the
beginning and end of the area be marked by the same command that
initiated the mark. A value of 'C' specifies cut/paste style marking.
In this style the mark initiated with one of the commands MARK-BLOCK,
MARK-LINE, or MARK-CHAR is extended as the cursor is moved. The
command COPY-TO-CLIPBOARD (Alt-V) copies marked text to the clipboard
(actually the ".killed" buffer). The command KILL-MARK (Alt-K) moves
marked text to the clipboard. The command BOTH-YANK (Ctrl-Y) retrieves
text from the clip board.
(built-in,mark): MARK_TYPE([mark_id[,'S'|'T']])
Returns the type or style of the mark specified. If a value of 'T' is
specified (default) for the second parameter, one of the types "BLOCK",
"CHAR", "LINE" or "" is returned. The null string indicates the mark
specified has not been set. When a value of 'S' is specified for the
second parameter the mark style is returned. Mark styles are 'C' or
'E' which correspond to cut/paste mark or begin/end mark respectively.
The null string is returned if the mark specified has not been set.
See also MARK-STYLE, GET_MARK
(command,mark): MARK-WORD
Sets a character mark from the cursor to the end of the word at the
cursor or the next word. A word is defined by the following regular
expression:
[a-zA-Z0-9_$]#
The above regular expression accepts valid characters in a C language
identifier. To change the default word characters, use the
WORD-CHARS command (CONFIG, "Other options...", "Word characters").
(built-in,search): MATCH_LENGTH('C'|['S'][0-9]|'' [,'I'|'P'])
Returns the length of the string found by the last SEARCH or
REPEAT_SEARCH executed. If the 'C' parameter is given, the number of
characters from the beginning of the match to the cursor is returned.
The ['S'][0-9] parameter is used to return a match length or a start
position of a match group. Specifying 'S' followed by a match group
number 0-9 (i.e. 'S0') will return the start position of that match
group. 1 is returned if that match group was not found. If 'S' is not
followed by a number, the start position of the entire string found is
returned. Specifying a match group number 0-9 will return the match
length of that match group. 0 is returned if that match group was not
found.
By default, all values returned are physical. Specify 'I' for the
second parameter if you want imaginary values (as if the tab characters
were expanded to spaces).
Example
/* This example works for files with tab characters. */
status=search('{if|then|while}','rew')
if status then
message 'Match not found'
return(status)
endif
get_line line
/* In this case, match_length('S')== match_length('S0') */
/* and match_length()==match_length('0'). */
word=substr(line,match_length('S0'),match_length('0'))
replace_line substr(line,1,match_length('S0')-1)||upcase(word)||
substr(line,match_length('S0')+match_length('0'))
See also MARK_MATCH, SEARCH, REPEAT_SEARCH, SEARCH_REPLACE,
SAVE_SEARCH, RESTORE_SEARCH, SEARCH_CASE
(command,misc): MATH expression
Evaluates SLICK language expression given and places the results on the
command line. Unlike the SLICK language, octal numbers may be
specified by prefixing the number with a 0 and binary numbers may be
specified by prefixing the number with '0b' or 'b'. If no operator is
specified between two unary expressions, addition is assumed.
Not all SLICK language operators are supported.
expression can have the following unary operators:
~ bitwise complement
- Negation
+ No change
The available binary operators are listed below from lowest to highest
precedence. A comma after the operator indicates that the next
operator is of the same precedence.
&, bitwise and
| bitwise or
+, addition
blank(s), Implied addition.
- subtraction
*, multiplication
/, division
//, remainder
% integer division
** power
See also MATHX, MATHO, MATHB
(command,misc): MATHB expression
Evaluates SLICK language expression given and places the result on the
command line in binary. Unlike the SLICK language, octal numbers may
be specified by prefixing the number with a 0 and binary numbers may be
specified by prefixing the number with '0b' or 'b'. If no operator is
specified between two unary expressions, addition is assumed.
Not all SLICK language operators are supported. See MATH
command for a list of operators.
See also MATHX, MATH, MATHO
(command,misc): MATHO expression
Evaluates SLICK language expression given and places the result on the
command line in octal. Unlike the SLICK language, octal numbers may be
specified by prefixing the number with a 0 and binary numbers may be
specified by prefixing the number with '0b' or 'b'.. If no operator is
specified between two unary expressions, addition is assumed.
Not all SLICK language operators are supported. See MATH
command for a list of operators.
See also MATHX, MATH, MATHB
(command,misc): MATHX expression
Evaluates SLICK language expression given and places the result on the
command line in hexadecimal. Unlike the SLICK language, octal numbers
may be specified by prefixing the number with a 0 and binary numbers
may be specified by prefixing the number with '0b' or 'b'.. If no
operator is specified between two unary expressions, addition is
assumed.
Not all SLICK language operators are supported. See MATH
command for a list of operators.
See also MATHO, MATH, MATHB
(command,misc): MAYBE-COMPLETE
If the visible cursor is on the command line, the partially typed
command currently on the command line is filled in ("completed") as
much as possible. Otherwise a space character is inserted or
overwritten at the cursor position depending on the insert state.
(command,misc): MAYBE-LIST-MATCHES
If the visible cursor is on the command line, a selection list of
possible completions to the partially typed command currently on the
command line is displayed. Otherwise the '?' character is inserted or
overwritten at the cursor position depending on the insert state.
(command,misc): MAYBE-NORMAL-CHARACTER
If the visible cursor is on the command line, the binding to the last
key pressed is executed. Otherwise the command KEY-NOT-DEFINED is
called. Used by fileman-mode.
(command,menu): MENU menu_name
Runs the menu specified. If the menu returns a command to execute in
RC, the command is executed.
See also LEVEL2-MENU, RETURN, MENU-FORMAT, FIND-MENU
(misc,menu): MENU-FORMAT
All menus are stored in the file "slick.mnu". You may change or add a
menu by editing this file or by creating another menu file. A menu can
be called with the MENU command (Not to be confused with the F10 key
which executes the EDIT-MENU command) followed by a menu name as
argument. To specify a menu that resides in an alternate menu file,
append a '.' character followed by the file name without path or
extension. For example, "menu test.user" would execute the menu test
contained in the file "user.mnu". All menu files must be accessible by
searching your PATH. The command FIND-MENU (MENU, Search, "Find
menu...") may be used to load the menu file and place the cursor on the
specified menu.
Format of a Menu
The format of a menu looks like this:
:menu_name [horizontal]
window title text;window subtitle text
menu item ;command-to-execite ; help-command-to-execute
menu item ;command-to-execite ; help-command-to-execute
menu item ;command-to-execite ; help-command-to-execute
...
A horizontal menu has the same format as the vertical menu described
above except that the command-to-execute field may only be a MENU or
LEVEL2-MENU call identifying a pop-down menu and the horizontal
option must appear after the menu name. The pop-down menus for a
horizontal menu must reside in the same file as the horizontal menu.
Menu Item
menu item must have a letter or digit selection character. The
selection character is enclosed with the character '^'. The menu
item text may not contain semicolons or '^'.
Command to Execute
When the menu is displayed and the menu item is selected by the
ENTER key or the selection character, the command-to-execute is
executed as if executed on the command line. The return code of
the command-to-execute determines the action taken by the menu as
follows:
RC value Menu Action
------------------------------------------------------------------
If numeric The menu remains on screen.
If non-numeric If the menu was called with the sticky
menu option (see below) and the first
word in RC is not E or EDIT, the RC code
is executed as a command and the menu
remains displayed. Otherwise, the menu is
closed and RC is returned to the previous
menu if any or executed..
Usually the command-to-execute command is RETURN, MENU command, or
QUERY command. You need to understand these commands as well as
commands you type on the command line to be able to write your own
menus.
Help Command to Execute
When the F1 key is pressed from within a menu, the
help-command-to-execute is executed as if it were typed on the command
line. Usually it invokes one of the commands POPUP-HELP or
POPUP-MESSAGE.
Typical help-command-to-execute Action
-------------------------------------------------------
POPUP-MESSAGE message Displays message word wrapped in a
pop-up window.
POPUP-HELP help_name help_type Displays help item from "slick.doc"
identified by help_name and help_type
in a pop-up window.
You may test these commands by executing them from the command line.
(built-in,display): MESSAGE string
If the shell window is open, string is displayed in the shell window.
Otherwise string is temporarily displayed on the message line.
Message will disappear after a key is pressed.
See also STICKY_MESSAGE, SHELL_STATE
(misc,help): MicroEdge Inc.
Call or write to us for Technical support.
MicroEdge Inc. phone#: (703) 670-4575
P.O. Box 2367
Fairfax, VA, 22031
Products
SLICK Editor for DOS 2.x or higher and OS/2 $195
SLICK MAKE version 2.0 $99
for DOS 2.x or higher and OS/2 Features C
Preprocessing and in-line link response
files. Write ONE make description file
that supports DOS or OS/2 executables,
multiple compilers, and any memory model.
Just like SLICK, SLICK MAKE can reduce
its memory usage to 8k by swapping itself
to EMS/extended memory and disk.
(built-in,file): MKDIR path
Creates the directory specified by path. If successful RC is set to
zero. Otherwise RC is set to one of the return codes in the file
"rc.sh".
(command,window): MOVE-EDGE
Moves the edge of a window. The window edge to move is specified with
the cursor keys. The new edge position is specified by moving
the cursor to the new edge position and pressing ENTER.
(built-in,mark): MOVE_MARK [mark_id]
Moves mark specified. For block and character marks the text
is inserted at the cursor position. For line mark the lines are
inserted after the current line. Resulting mark is at destination.
(command,mark): MOVE-MARK
Moves the visible mark. For block and character marks the text is
inserted at the cursor position. In the case of a line mark the lines
are inserted before or after the current line depending upon the line
insert style (CONFIG, "Other options...", "Line insert style...").
Lines are inserted after the current line by default. Resulting mark
is at destination. Text may be marked with one of the commands
MARK-CHAR (Alt-Z), MARK-LINE (Alt-L), or MARK-BLOCK (Alt-B).
(command,mark): MULT
Multiplies adjacent lines of marked text and inserts result below the
last line of the mark. Accepts valid expression accepted by the MATH
commands. If no operator exists between two adjacent numbers, addition
is assumed.
See also MATH, MATHX, MATHO, MATHB, ADD
(command,file): NAME [filename]
Changes the name of the current buffer to filename. If no filename is
specified the current value is displayed on the command line for
editing.
(built-in,name): NAME_CLASS(index)
Returns whole number corresponding to name table index. If index
is not an index to a valid name or name has no information, 0
is returned. SLICK stores help classes here which are used to
subdivide the help names.
See also FIND_INDEX, NAME_MATCH, NAME_NAME, NAME_TYPE, NAME_INFO
NAME_HELP, SET_NAME_HELP, FIND_LINK, CALL_LINK, INSERT_NAME,
SET_NAME_INFO, SET_NAME_CLASS, DELETE_NAME
(built-in,name): NAME_HELP(index)
Returns whole number corresponding to name table index. If index
is not an index to a valid name or name has no information, 0
is returned. SLICK stores "buffer position pointers" here which
are used similar to seek positions.
Example
load_files "slick.doc" /* load the help doc file */
index= find_index("name-help") /* Find the index for "name-help" */
help_point= name_help(index) /* get the buffer position pointer. */
goto_point help_point /* go there. */
See also FIND_INDEX, NAME_MATCH, NAME_NAME, NAME_TYPE, NAME_INFO
SET_NAME_HELP, FIND_LINK, CALL_LINK, INSERT_NAME,
SET_NAME_INFO, NAME_CLASS, SET_NAME_CLASS, DELETE_NAME
(built-in,name): NAME_INFO(index)
Returns name information corresponding to name table index. If index
is not an index to a valid name or name has no information, ''
is returned. For commands, the name information is a list of the
types of arguments the command accepts.
Example
index= find_index("repeat-search")
message 'Information for repeat-search is 'name_info(index)
See also FIND_INDEX, NAME_MATCH, NAME_NAME, NAME_TYPE, NAME_HELP,
SET_NAME_HELP, FIND_LINK, CALL_LINK, INSERT_NAME,
SET_NAME_INFO, NAME_CLASS, SET_NAME_CLASS, DELETE_NAME
(command,keyboard): NAME-MACRO [name]
Gives the last keyboard macro defined the name specified. The
WRITE-STATE command may be used to save keyboard macros for the next
session. You may execute a keyboard macro by typing its name on the
command line or binding it to a key.
(built-in,name): NAME_MACRO name,kbd_macro_string
If name exists in the names table and has type COMMAND_TYPE or MACRO_TYPE,
the type of name will become (MACRO_TYPE | INFO_TYPE) with information
kbd_macro_string. Upon successful completion RC is set to 0. Otherwise
RC is set to INTERPRETER_OUT_OF_MEMORY_RC and message will get displayed
after macro finished unless CLEAR_MESSAGE is called.
Example
name_macro "last-kbd-macro",get_macro()
See also NAME_MACRO, GET_MACRO, START_KBD_MACRO, END_KBD_MACRO
(built-in,name): NAME_MATCH(name_prefix,find_first[,name_t])
Returns name table index of the name with prefix matching name_prefix
and where (name_t & name_type(index)) is true. A non-zero value for
find_first, begins a new search. If find_first is zero, the next
matching index is returned. 0 is returned if no match is found. Search
is not case sensitive regardless of operating system. Underscores in
name_prefix are translated to dashes before search takes place.
Example
name_t= COMMAND_TYPE /* COMMAND_TYPE is defined in "slick.sh" */
name_prefix='p' /* Find names that start with p */
index= name_match(name_prefix,1,name_t) /* Find first */
loop
if not index then leave endif
say 'name='name_name(index)
index= name_match(name_prefix,0,name_t) /* Find next */
endloop
pause
See also NAMES, FIND_INDEX, BUF_MATCH, FILE_MATCH
(built-in,name): NAME_NAME(index)
Returns name corresponding to name table index. If index is not an
index to a valid name, '' is returned. Names are returned in lower
case.
Example
index= name_match("repeat-se")
message 'possible match of repeat-se is 'name_name(index)
See also FIND_INDEX, NAME_MATCH, NAME_TYPE, NAME_INFO, NAME_HELP,
SET_NAME_HELP, FIND_LINK, CALL_LINK, INSERT_NAME,
SET_NAME_INFO, NAME_CLASS, SET_NAME_CLASS, DELETE_NAME
(built-in,name): NAME_TYPE(index)
Returns name type corresponding to name table index. If index is not
an index to a valid name, 0 is returned.
Example
index= find_index("repeat-search")
message 'repeat-search name type is 'name_type(index)
See also FIND_INDEX, NAME_MATCH, NAME_NAME, NAME_INFO, NAME_HELP,
SET_NAME_HELP, FIND_LINK, CALL_LINK, INSERT_NAME,
SET_NAME_INFO, NAME_CLASS, SET_NAME_CLASS, DELETE_NAME
(command,buffer): NEXT-BUFFER
Switches to view of the next buffer within the current window.
(command,misc): NEXT-ERROR
Finds next error in concurrent process buffer created by the
START-PROCESS command. Cursor is placed on line and column of file
with error.
Supported error message syntax
Is described by the regular expression:
^\**(error(~.)|warning(~.)|)\** *{:q|:p}( +| *\(|\:){:d#}(,|\:|)
( *{:d#}|)(\)|) @\:
In English expression terms:
begin-line[stars]['error' not '.'|'warning' not '.'][stars][blanks]
filename[[blanks|[blanks]'('|':']number[','|':'][blanks number][')']]
[blanks]':'
Here are some supported messages:
filename line column: message GREP.EXE has this syntax
filename (line column): message
filename (line, column): message
filename (line) : message
Error filename line: message
Warning filename line: message
"filename" line column: message
"filename" (line column): message
"filename" (line, column): message
"filename" (line) : message
Error "filename" line: message
Warning "filename" line: message
**Error** filename(100) message
*Warning* filename(100) message
See also START-PROCESS, STOP-PROCESS, CURSOR-ERROR, EXIT-PROCESS,
SET-NEXT-ERROR,RESET-NEXT-ERROR
(command,window): NEXT-GROUP
Switches to next window group.
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
See also PREV-GROUP
(built-in,window): NEXT_GROUP
Switches to next window group. Currently there can only be two window
groups. The hidden window group holds buffers that are handled by
SLICK macros and buffers that users don't wish to see. The other
window group holds buffers that the user does wish to see. Each window
group has a ring of windows. Each window contains a ring of views.
Each view is a position in a buffer.
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
See also PREV_GROUP
(built-in,window): NEXT_VIEW
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
A view holds the information necessary for the editor to remember your
location and scroll position in a buffer. Each window has a ring of
views to buffers. When you have more than one window looking at the
same buffer. The windows have different views of that buffer.
NEXT_VIEW switches to the next view in the current window.
See also GET_VIEW_ID, ACTIVATE_VIEW, PREV_VIEW, QUIT_VIEW,
LOAD_FILES, NEXT_WINDOW, PREV_WINDOW
(command,window): NEXT-WINDOW
Switches to next window.
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
See also PREV-WINDOW
(built-in,window: NEXT_WINDOW
Switches to the next window of the active window group.
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
See also GET_VIEW_ID, ACTIVATE_VIEW, NEXT_VIEW, PREV_VIEW, QUIT_VIEW,
LOAD_FILES, PREV_WINDOW
(misc,language): NO-CODE-SWAPPING
When this key word is present in a SLICK macro module, SLICK will
load this module from the state file SLICK.STA into memory when it is
invoked and never allow it to be swapped out of memory. This feature
is a safety feature to make sure that some editing capabilities still
exist when critical disk problems occur.
(command,keyboard): NORMAL-CHARACTER
Insert or overwrites the last key pressed depending upon the insert
state.
(command,misc): NOTHING
Affects nothing
(misc,language): NUMBERS
The SLICK language has support for floating point numbers and hex
numbers. The mantissa and exponent are limited to 9 digits. When
precision is lost, the result is rounded. Overflow and underflow are
detected. Floating point numbers have the following syntax:
[+|-] digits [.][digits][E[+|-]digits]
or
[+|-] [.]digits[E[+|-]digits]
and hex numbers (like C)
0x hexdigits
The leading sign may have blanks before and after.
Example
4
' + 4e2'
4e2
' -4E-2'
-4E-2
0xff
0xffffffff /* In our implementation this is -1. */
/* When using the math commands, this is a */
/* floating point number which will cause */
/* errors when used with bitwise operators. */
/* The maximum "safe" hex number is */
/* 0x3b9ac9ff=999999999 */
+999999999e+999999999 /* largest floating point number */
-999999999e-999999999 /* smallest exponent with largest negative */
/* mantissa. */
(command,window): ONE-WINDOW
Deletes all windows accept the current window which is zoomed.
(misc,language): OPERATORS
An expression can have the following unary operators:
NOT logical not
~ bitwise complement
- Negation
+ No change
The binary operators for the SLICK language are listed below from
lowest to highest precedence. A comma after the operator indicates
that the next operator is of the same precedence.
and, logical and. If left hand expression is false, right hand
expression is not evaluated.
or logical or. If left hand expression is true, right hand
expression is not evaluated.
=, If both expressions are numbers, a number comparison is
performed. Otherwise a string comparison is performed. In
any case leading and trailing spaces and tabs are strip
before the comparison is performed.
>, Greater than. Handles numbers or strings. see = operator
>=, Greater than or equal. Handles numbers or strings. See =
operator.
<, Less than. Handles numbers or strings. See = operator.
<=, Less than or equal. Handles numbers or strings. See =
operator.
<>, Not equal. Handles numbers or strings. See = operator.
==, Exactly equal. Always performs string comparison.
/==, Not exactly equal. Always performs string comparison.
<<=, Exactly less than or equal. Always performs string comparison.
<<, Exactly less than. Always performs string comparison.
>>=, Exactly greater than or equal. Always performs string
comparison.
>> Exactly greater than. Always performs string comparison.
|| Concatenation
blank(s) Implied concatenation. Concatenates one blank between
left and right expression. Results are unpredictable if a
comment exists between the left and right expression.
&, bitwise and
| bitwise or
+, addition
- subtraction
*, multiplication
/, division
//, remainder
% integer division
** power
Note: Expressions may extend across line boundaries, if the line ends
in an operator. Parameters passed to functions may extend
across line boundaries if the line ends in a comma.
Example
1 2 =='1 2'
4**2 =='16'
5/2 =='2.5'
5//2 =='1'
5%2 =='2'
5&2 =='0'
5|2 =='7'
(10<7) =='0'
(10<<7) =='1'
See also STRINGS
(command,mark): OVERLAY-BLOCK-MARK
Overwrites visible block mark at cursor position. No clipboard is
created. Resulting mark is at destination. A block of text may be
marked with the MARK-BLOCK command (Alt-B).
(built-in,mark): OVERLAY_BLOCK_MARK [mark_id]
Overwrites block mark specified at cursor position. No clipboard is
created. Resulting mark is at destination.
(command,buffer): PAGE
Runs the external macro "page.s" which creates a copy of the current
buffer, gives the copy the extension .prt, inserts page breaks and
formats buffer for printing according to format options. A pop-up
dialog box is presented to you with the default format options. The
format options are:
Header [Yes,No] If yes, prints buffer name as
first line of page.
Page number [Yes,No] If yes, page number is printed
at bottom of each page.
Blank lines at top Number of blank lines to print
after header.
Blank lines at bottom Number of blank lines to print
before page number.
Lines per page Number of buffer lines to print
on each page. Must account for
header lines and footer lines.
Columns per line Number of columns per line. Lines
longer than this column are split.
Leading printer codes Printer codes to be sent to printer
before buffer. Printer codes must
be entered as a character string.
To enter a control character, press
Ctrl-Q, hold down the ALT key, type
the number on the key pad, and lift
the ALT key.
Trailing printer codes Printer codes to be sent to printer
after buffer.
Print device [PRN,LPT1,LPT2] Default printer device used by
PRINT commands.
See also PRINT, PUT
(command,cursor): PAGE-DOWN
Moves cursor to next page of text.
See also PAGE-UP
(built-in,cursor): PAGE_DOWN
Moves text under the cursor ".window_height" -1 lines up. If the
bottom line of the buffer is reached and it is not visible, the cursor
is placed at the last row of the window. PAGE_DOWN is not affected by
SCROLL_STYLE. If bottom of hit is reached RC is set to
BOTTOM_OF_FILE_RC, otherwise RC is set to 0.
Example
page_down
if rc=BOTTOM_OF_FILE_RC then
/* BOTTOM centers last line of buffer if scroll style is CENTER. */
bottom
message get_message(rc)
endif
See also PAGE_UP, INTERNAL-VARIABLES
(command,cursor): PAGE-UP
Moves cursor to previous page of text.
See also PAGE-DOWN
(built-in,cursor): PAGE_UP
Moves text under the cursor ".window_height" -1 lines down. If there
are not enough lines left in the file to keep the cursor at the same
row on the screen, the cursor row ".cursor_y" changes. The top of line
of the buffer will always be seen at ".cursor_y" = 0. SCROLL_STYLE has
no effect on PAGE_UP. If top of buffer is hit RC is set to
TOP_OF_FILE_RC, otherwise RC is set to 0.
See also PAGE_DOWN, INTERNAL-VARIABLES
(built-in,string): PARSE VALUE string WITH template
Parses string as specified by template.
Template may contain
variable_name Output variable
. Null output variable
nnn Number specifying new parse column
+nnn Amount to increment parse column relative
to start of last string found or last
column setting.
-nnn Amount to decrement parse column relative
to start of last string found or last
column setting.
'text'[,search_options] String constant to search for. If found,
parse column becomes first character after
text. Otherwise parse column becomes first
character after length of string being parsed.
search_options is an expression that may
evaluate to one or both the options 'r' and
'i'. 'r' specifies a regular expression
search. 'i' specifies a case insensitive
search. For syntax of regular expression
see help on / command ("help /").
(text)[,search_options] String expression to search for. If found,
parse column becomes first character after
text. Otherwise parse column becomes first
character after length of string being parsed.
See above for a description of the search
options.
Rules for parse column
* The parse column is initialized to column 1
* If a column or column increment specifies a column greater than the
length of the string being parsed, the parse column is set to the
length of the string being parsed plus one.
* if a column decrement specifies a column less than the length of the
string being parsed, the parse column is set to column 1.
Rules for setting output variables
* Output variables are set in groups. An output variable group is
defined to be consecutive variables with no search or column
specifiers between them.
* Before variables of an output variable group can be set, the end
parse column within the source string must be found. In the case
the end parse column is set by a search, the end parse column for
this output variable group becomes the first character to the left
of the text found. In the case the end parse column is set by a
column or column increment the end parse column becomes the first
character to the left of the column. The start parse column is
the current parse column as specified by the template.
* A word parse of the text between the start and end columns is
performed to set the variables in an output variable group if the
group contains more that one variable. Otherwise the one output
variable is set to the text between the start and end columns of
the source string. Each variable set by a word parse will have
no leading or trailing tabs/spaces except for the last output
variable which is set to the rest of the sub-string.
* If the start column is greater than the end column the variables
in the output group are set to null.
Examples
parse value '1 2 3' with a b c
/* Results are a=='1', b=='2', c=='3' */
parse value '1 '\t' 2 '\t' 3' with a b c
/* Results are a=='1', b=='2', c=='3'. Note that tab and space */
/* characters are stripped. */
parse value '1 2 3' with a . b
/* Results are a=='1', b=='3' */
parse value 'xxx1 2 3yyy 4 5' with 'xxx' a b c 'yyy' d e
/* Results are a=='1', b=='2', c=='3', d=='4', e=='5' */
parse value 'xxx1 2 3yyy 4 5' with 'xxx' a 'yyy' b
/* Results are a=='1 2 3', b==' 4 5' */
parse value 'xxx1 2 3yyy 4 5' with 'xxx' +0 a 'yyy' +0 b
/* Results are a=='xxx1 2 3', b=='yyy 4 5' */
parse value 'c/x/y' with 1 delim +1 s1 (delim) s2 (delim) options
/* Results are delim=='/', s1=='x', s2=='y', options=='' */
(command,misc): PASCAL-ENTER
New binding of ENTER key when in PASCAL mode. Handles syntax expansion
and indenting for files with PAS extension. See config menu to change
syntax expansion/indenting options.
(command,misc): PASCAL-MODE
Activates PASCAL file editing mode. The ENTER and SPACE BAR bindings
are changed as well as the tab and margin settings.
(command,misc): PASCAL-SPACE
New binding of SPACE key when in PASCAL mode. Handles syntax expansion
and indenting for files with PAS extension. See config menu to change
syntax expansion/indenting options.
(built-in,file): PATH_SEARCH(filename [,env_var [,'P'|'M']]
Searches the path specified for a file or program. If found, the file
name with path is returned. First, the path given with filename is
searched. Then the directories specified by the environment variable
env_var are searched. env_var defaults to "PATH" if not specified.
The third optional parameter specifies a program search. 'M' and 'P'
both specify program search. The 'M' option includes searching for .S
and .SX files. The search order for a program is:
COM
EXE
S (if M option specified)
SX (if M option specified)
CMD or BAT (CMD for OS/2 and BAT for DOS)
There is one exception to the order above. If a .SX file is found and
then the source .CMD is found, the .CMD file is returned. This
simplifies the automatic make of macros since the source file is always
found first and allows SLICK batch files to be found first.
Example
name=path_search('s','PATH','P') /* Find s.exe */
name=path_search('shell','PATH','M') /* Find external shell */
name=path_search('slick.sta') /* Find state file */
(built-in,file): PATHLEN(filename)
Returns length of the path in the string filename including trailing
backslash.
(built-in,display): PAUSE
Opens the shell window if it is not already open, displays the
message 'Press any key to continue', and waits for a key to be pressed.
(built-in,misc): PEEK(seg ofs,count)
Returns count bytes of memory specified by the pointer seg:ofs.
See also POKE, INT86X, VAR_OFS, VAR_SEG
(built-in,misc): POINT(['L'])
Returns whole number with current block number and line number WITHIN
block encoded. The block number and the line number within the block
are both 16 bits. If the 'L' option is specified the current line (32
bits) number is returned. Unlike the internal variable ".line" which
determines the current line number when it is not known, a line number
of -1 is returned to indicate that the line number is not known.
Example
p=point()
message 'block='(p%65536)' line number within block='p&(0xffff)
See also GOTO_POINT
(built-in,misc): POKE seg ofs,string
Sets the memory specified by the pointer seg:ofs to string.
See also PEEK, INT86X, VAR_OFS, VAR_SEG
(command,help): POPUP-HELP [name [help_type]]
Displays help for name of type help_type in a pop-up window. For a list
of possible help types, type "popup-help popup-help ?" on the command
line.
See also HELP, HELP-CLASS, POPUP-MESSAGE
(command,help): POPUP-MESSAGE message_text
Displays message_text in pop-up window.
See also HELP, HELP-CLASS, POPUP-HELP
(built-in,string): POS(needle[,haystack[,start[, options]]])
Returns the position of needle in haystack. If needle is not found, 0
is returned. start specifies the position at which the search should
begin. start defaults to 1. Multiple options may be specified with
the following meaning:
'I' Ignore case.
'R' Interpret search string needle as a regular expression.
See help on / command for syntax of regular expressions.
Example
pos('a','zzz') == '0'
pos('a','zzza') == '4'
pos('a','zzzA',1,'I') == '4'
pos('a','zzza',5) == '0'
pos('[a-z]','%$?a',1,'R') == '4'
Calling the POS function with one parameter allows you to retrieve
match group information. Specifying 'S' followed by a match group
number 0-9 (i.e. 'S0') will return the start position of that match
group. 1 is returned if that match group was not found. If 'S' is not
followed by a number, the start position of the entire string found is
returned. Specifying a match group number 0-9 will return the match
length of that match group. 0 is returned if that match group was not
found. A value of '' will return the match length of the entire string
found.
Example
get_line line
word_sep='([~a-zA-Z0-9_$]|^|$)'
i=pos(word_sep'{if|then|while}'word_sep,line,'','r')
if not i then
message 'Match not found'
return(1)
endif
word=substr(line,pos('S0'),pos('0'))
(command,buffer): PREV-BUFFER
Switches to view of the previous buffer within the current window.
(command,window): PREV-GROUP
Switches to previous window group.
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
See also NEXT-GROUP
(built-in,window): PREV_GROUP
Switches to previous window group. Currently there can only be two
window groups. The hidden window group holds buffers that are handled
by SLICK macros and buffers that users don't wish to see. The other
window group holds buffers that the user does wish to see. Each window
group has a ring of windows. Each window contains a ring of views.
Each view is a position in a buffer.
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
See also NEXT_GROUP
(built-in,misc): PREV_INDEX([new_value])
Returns index of previous command executed by a key or the built-in
function CALL_KEY. If new_value is given, the previous command index
is set to new_value.
See also LAST_INDEX
(built-in,window): PREV_VIEW
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
A view holds the information necessary for the editor to remember your
location and scroll position in a buffer. Each window has a ring of
views to buffers. When you have more than one window looking at the
same buffer. The windows have different views of that buffer.
PREV_VIEW switches to the previous view in the current window.
See also GET_VIEW_ID, ACTIVATE_VIEW, NEXT_VIEW, QUIT_VIEW,
LOAD_FILES, NEXT_WINDOW, PREV_WINDOW
(command,window): PREV-WINDOW
Switches to previous window.
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
See also NEXT-WINDOW
(built-in,window): PREV_WINDOW
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
Switches to the previous window of the active window group.
See also GET_VIEW_ID, ACTIVATE_VIEW, NEXT_VIEW, PREV_VIEW, QUIT_VIEW,
LOAD_FILES, NEXT_WINDOW
(command,buffer): PRINT
Prints the current buffer by saving the buffer to the default print
device PRN. The default print device name and options are accessible
through the CONFIG menu (F5) under "Print options...".
See also PUT, PAGE
(built-in,misc): PROCESS_INFO(['C'|'B'|'R'])
This function returns information about the process running depending
upon the input given as follows:
INPUT OUTPUT
no parameter Returns 1 if the concurrent process is running.
Otherwise 0 is returned.
'C' Returns start column of process request for
input. If the current line is not reading
input for a concurrent process, 0 is
returned.
'B' Returns 1 if the current buffer has a
concurrent process. Otherwise 0 is returned.
'R' Returns 1 if the concurrent process buffer is
running. Otherwise 0 is returned. A delay is
performed and pending concurrent process
ouput is read into the concurrent process buffer.
See also CONCUR_SHELL, STOP_PROCESS
(command,mark): PUT filename | -p
Writes marked text to filename specified. The filename maybe a printer
device name such as PRN, LPT1, or LPT2 to send the output to the
printer. The -p option selects the default printer device as the
output file. The default print device and options are accessible
through the CONFIG menu (F5) under "Print options...". Mark text first
with one of the commands MARK-CHAR, MARK-LINE, or MARK-BLOCK.
See also MARK-CHAR, MARK-LINE, MARK-BLOCK, APPEND
(command,keyboard): QUERY {options} prompt: [default_value]
The QUERY command is used to prompt the user in a pop-up window for
one or more arguments. One of the options -x, -d, -di, or -vx must be
specified for argument retrieval to be supported. Argument retrieval
is supported with the F9 and F10 keys.
Even though the query command may be called from the command line, much
of its function can not be utilized without calling it from within
the macro language and passing it more than one argument.
Return values
number Error code
'nothing' or '0' Simple query which uses -q option returns
the value 0 if -sticky option is specified.
Otherwise 'nothing' is returned.
'execute-query 'command query_view_id
Successful query returns query_view_id
containing users response. The command
returned is the command specified by the -x,
-vx, or -d option. Typically this string is
executed, causing the EXECUTE-QUERY command to
be called. The EXECUTE-QUERY command calls
command with arguments contained in the buffer
corresponding to query_view_id and quits the
query_view_id buffer. First response field is
at line number (.Noflines%2+1). If the
-sticky option is specified, the
EXECUTE-QUERY command string is executed
and its RC code is returned.
Argument number Arguments 3-7 are optional.
1 Same as shown above. This argument is ignored
if arg(3) or arg(7) are specified.
3 menu_point The position of a query menu in a menu
buffer as returned by the point() function.
The buffer with the menu must be active. See
query menu example below.
4 help_text Help text to be displayed when F1 is pressed.
If help_text starts with the character '.',
help_text is assumed to specify a help item in
"slick.doc". For example a value of
".write-state command" would bring up help for
the WRITE-STATE command when F1 is pressed.
5 title_text Title text to be displayed as buffer name for
window.
6 subtitle_text Subtitle text to be displayed as subtitle of
window.
7 view_id view_id of buffer with prompts and default
values already set up.
options
-q Quit results of query before returning. Normally,
one view of the query buffer results are
returned. This option must be used for simple
queries which set universal variables. You
must use this option if you test the QUERY
command from the command line. For example,
query('-q -y -v def-start-on-cmdline')
-sticky If the -sticky option is specified and a
command string is about to be returned, the
command string is executed. The RC code of the
command string is returned. This has the
effect of keeping the menu levels that called
the QUERY command from being exitted when the
ENTER key is pressed.
-i completion_info Completion information. May be any constant
listed in the file "slick.sh" with suffix
"_ARG". The suffix "_ARG" should not be given.
FILE File name argument
BUFFER Buffer name argument
CMDNMACRO Command or Keyboard macro argument
COMMAND Command argument
MACRO Keyboard macro argument
MODULE Slick module argument
PC Procedure or command argument
PCB Procedure, command, or built-in
argument
PCB-TYPE Proc,command, and built-in types
PROC Procedure argument
VAR Variable argument
ENV Environment variable argument
MENU Menu name argument
HELP Help name argument
HELP-TYPE Help type argument
HELP-CLASS Help class argument
COLOR-FIELD Color field argument
-p DO NOT get previous values from ".command" buffer
and DO NOT insert users response into ".command"
buffer.
-x proc_name Command to execute after query panel is filled
in. proc_name is used to search for the previous
values of the query panel in the ".command" buffer.
If the -x option is not specified but the -d option
is specified, the -d command is used as the -x
proc_name. For example,
query('-x tabs -d tabs Enter tabs:')
-d command Get default value by executing command with a null
argument. The null argument may be changed with
the "-n char" option (See below). For example,
query('-d tabs Enter tabs:') will cause the tabs
command to be executed with no argument which
places the current value on the command line. This
command line value is used as the default value of
the prompt.
-di command Get default value by executing command with a null
argument unless previous input value can be
retrieved.
-y Restrict user input to Y/N. If -v option follows,
variable value is converted from 1/0 to Y/N. If -v
option is specified users response of Y/N is
converted to 1/0 and placed in the variable upon
successful completion of fillin panel. For
example,
query('-q -y -vx def-top-bottom-style '||
'Preserve column position [Yes,No]:')
IMPORTANT: -y option must appear before -v or
-vx options.
-v variable Get default value from variable. On valid user
response variable is set to users response.
Don't forget to specify the -q option to quit
the query return buffer if you just want to set
the value of the variable.
-vx variable Get default value from variable and set
retrieve command (-x option) to "set-var
variable". On valid user response variable is
set to users response. Don't forget to specify
the -q option to quit the query return buffer
if you just want to set the value of the variable.
-w Separate default value into several words.
-c char-set Restrict user input to character in char-set. For
example "-c yn" restricts the users input to
words that start with y or n.
-r n1,n2 Restrict user input to integer range n1..n2.
For example,
query('-q -r 0,999999999 '||
'-vx def-read-ahead-lines '||
'Read ahead lines:')
-n char Use char as the null argument for the -d
option. For example,
query("-n < -d load Load macro module:")
-s subtitle_text: Subtitle text for window.
-t title_text: Title text for window.
-h help_text: Help text displayed when F1 is pressed. If
help_text starts with a ".", help text is assumed to
specify a help item in "slick.doc". For example,
"-h .tabs command:" specifies the help item
for the tabs command in "slick.doc". If help_text
is not specified but either the -d or -x options
are specified, help on the command is assumed.
For example,
query('-d tabs Enter tabs:')
is identical to
query('-d tabs -h .tabs command: Enter tabs:')
is identical to
query('-d tabs Enter tabs:','','',
'.tabs command')
-e proc_name[:word] Command or procedure to call to check input
field. The first parameter passed to
proc_name is the users response for the
input field. The second parameter will be
word if specified. This function must
return 0 if user input values are O.K.
-@ Separate command line retrieval and query
argument retrieval. Effects single
argument query only.
- space string When the '-' is followed by a space all
characters after the space are considered
part of the prompt.
When the -x ,-d, -di, or -vx options are not given, the users response
is not entered into the command retrieve buffer.
Limitations: default_value may not contain the ':' character.
Examples
/* Command line style. You may invoke query from the command */
/* line for testing purposes. Note that in this case the -q */
/* option is necessary. If not given, the hidden window group */
/* would fill up with buffers containing the results of queries. */
'query -q -d write-state save configuration to:'
/* Read two input values. No retrieval. */
status=query('-h Help text for prompts: '||
'-i FILE Enter file name::'||
'-i ENV Enter environment variable name:')
if isnumber(status) then /* User abort or error? */
return(status)
endif
parse value status with . . query_view_id
get_view_id view_id
activate_view query_view_id
.line=.Noflines%2+1
get_line file_name
down;get_line env_name
quit_view
activate_view view_id
messageNwait('file-name='file_name' env-name='env_name)
/* Read/set variable input value and get tabs value.
/* No retrieval (-p). */
status=query('-p -h Help text for prompts: '||
'-v def-read-ahead-lines Read ahead line count::'||
'-d tabs -e check-tabs Enter tab stops:')
if isnumber(status) then /* User abort or error? */
return(status)
endif
parse value status with . . query_view_id
get_view_id view_id
activate_view query_view_id
.line=.Noflines%2+1
/* Skip parameter 1. Variable has already been set. */
down;get_line env_name
quit_view
activate_view view_id
messageNwait('env-name='env_name)
/* Read/set variable input values. No retrieval (-p). */
status=query('-p -h Help text for prompts: '||
'-r 0,999999999 -v def-read-ahead-lines'||
' Read ahead line count::'||
'-d tabs -e check-tabs Enter tab stops:')
if isnumber(status) then /* User abort or error? */
return(status)
endif
parse value status with . . query_view_id
get_view_id view_id
activate_view query_view_id
.line=.Noflines%2+1
get_line file_name
down;get_line env_name
quit_view
activate_view view_id
messageNwait('file-name='file_name' env-name='env_name)
QUERY menus may be defined in SLICK.MNU as follows
:menu_name query
title;subtitle
prompt
prompt
prompt
...
Example
:long_query query
Fill in prompts;Enter=Select Esc=Cancel F1=Help
-i FILE - Filename:
-i ENV - Environment variable:
-i MACRO - keyboard macro:
(command,buffer): Q,QUIT
Removes the buffer from the active window group. If the buffer is
modified, you will be prompted whether you wish to throw away the
changes. If the buffer name starts with a '.' such as ".killed" or
".command" no prompt is displayed. By convention, a buffer that starts
with a dot is a temp file that is safe to remove. When there are
no more buffers in the current window group, the editor exits. Otherwise
the previous buffer becomes active.
(misc,language): QUIET_SHELL command
Normally, when an external program is executed, the screen is cleared.
When the command is prefixed with the QUIET_SHELL primitive, the screen
is not cleared.
(command,window): QUIT-VIEW
Removes view of current buffer from active window. No check is
performed to see if buffer needs to be saved.
For an explanation of how windows,views, and buffers are related, type
"help windows-structure" on command line.
(built-in,window): QUIT_VIEW
For an explanation of how windows,views, and buffers are related,
type "help windows-structure" on command line.
A view holds the information necessary for the editor to remember your
location and scroll position in a buffer. Each window has a ring of
views to buffers. When you have more than one window looking at the
same buffer. The windows have different views of that buffer.
QUIT_VIEW removes the active view from the window view ring. The
previous view becomes the new in the active view. When QUIT_VIEW is
executed and only one view exists in the active window, the window is
removed from the active window group. If no more windows exist the
active window group is removed. The editor exits when the only window
group left is the hidden window group. The hidden window group holds
the command retrieve file ".command".
See also GET_VIEW_ID, ACTIVATE_VIEW, NEXT_VIEW, PREV_VIEW,
LOAD_FILES, NEXT_WINDOW, PREV_WINDOW
(built-in,keyboard): RAW_LASTKEY()
Returns a system dependent string representation of the last key
returned from GETKEY or TESTKEY. For DOS and OS/2, a string of length
two is returned. The first character is the character code, and the
second character is the scan code. THIS FUNCTION WILL NOT RETURN KEYS
FROM A KEYBOARD MACRO that is running.
See also GETKEY, TESTKEY, LASTKEY, CALL_KEY, KEY2NAME,
KEY2INDEX, INDEX2KEY, LIST_BINDINGS, KEYTAB_INDEX,
SET_KEYTAB_POINTER
(misc,language): RC
The RC variable is a predefined UNIVERSAL (meaning accessible from all
loaded modules) variable. By convention, built-in functions that have
error conditions, set the RC variable to correspond to the error.
Built-in functions which do not return a value but do set RC, will have
a pending message. For example, the built-in functions MARK_LINE and
INSERT_FILE_LIST have pending messages and ALLOC_MARK does not. For a
complete list of error codes, look in the file "rc.sh".
Example
unmark;copy_mark /* Cause a pending message which will get */
/* displayed when the macro finishes. */
/* RC is set by COPY_MARK to */
/* TEXT_NOT_MARKED_RC. */
(command,file): READ-LIST filename
Appends the list specified to the current file. All columns are
updated to the current file info. Files read are typically in the file
manager column format and can be written using WRITE-LIST, PUT, SAVE,
or FILE commands. A file list of absolute or relative file names
starting in column one is accepted.
(command,mark): REFLOW-MARK
Reflows the text within the visible mark according to the margin
settings. Character mark is not supported.
See also MARGINS, REFLOW-PARAGRAPH
(built-in,mark): REFLOW_MARK [mark_id]
Reformats the mark specified according to the current margin settings.
If the buffer containing the specified mark is active when this
function is invoked, the resulting lines are inserted after the end of
the mark. Otherwise the resulting lines are inserted after the cursor.
Character mark is not supported.
See also GET_REFLOW_POSITION
(command,misc): REFLOW-PARAGRAPH
Reflows the text of the current paragraph according to the margin
settings. Paragraphs are assumed to be separated by at least one
blank line.
See also MARGINS, REFLOW-MARK
(built-in,display): REFRESH
Closes the shell window and updates those portions of the editor screen
which need updating.
(built-in,file): RELATIVE(filename)
Returns filename with relative path specification.
Example
/* Assuming current working directory is 'c:\slick' */
relative('c:\slick\s.exe') == 's.exe'
relative('c:\autoexec.bat')== 'c:\autoexec.bat'
See also ABSOLUTE
(command,search): REPEAT-SEARCH
Repeats a search initiated by a search command in same direction and
with the same search options.
See also /, C, I-SEARCH
(built-in,search): REPEAT_SEARCH [options [,start_col]]
Repeats the last search. Multiple search options may be specified
which have the following meaning:
'+' Forward search
'-' Reverse search
'<' Place cursor at beginning of string found
'>' Place cursor after end of string found
'E' Case sensitive search
'I' Case insensitive search
'M' Search within visible mark.
'R' Search for regular expression
'W' Limits search to words. Used to search and replace
variable names. The default word characters are
[A-Za-z0-9_$].
'W=regular-expression'
Specifies a word search and sets the default word
characters to those matched by the regular-expression
given.
Any search option not specified takes on the same value as the last
search executed. The exact start column of the search may be specified
by start_col. If start_col is not given, searching continues so that
the string found by the last search command is not found again.
Example
search 'def'
loop
if rc then leave endif
if .col=1 then
rc=0;leave /* Found def in column 1 */
endif
repeat_search
endloop
See also SEARCH, MARK_MATCH, MATCH_LENGTH, SEARCH_REPLACE,
SAVE_SEARCH, RESTORE_SEARCH, SEARCH_CASE
(built-in,misc): REPLACE_LINE line
Sets the current line of the current buffer to line.
See also GET_LINE, INSERT_LINE, DELETE_LINE
(command,misc): RESET-NEXT-ERROR
Sets the NEXT-ERROR commands start search position to the end of the
compiler error message buffer. For DOS, this command will quit the
'$errors.tmp' file. For OS/2, the NEXT-ERROR commands invisible mark
is moved to the end of the concurrent process buffer called ".process".
See also SET-NEXT-ERROR
(command,misc): RESTORE
Resumes the last edit session which was terminated by the XDOS or
SAFE-EXIT command. The SAFE-EXIT command will save the window/buffer
configuration only if AUTO-RESTORE is set to on. When AUTO-RESTORE is
on and the editor is invoked with no file or command parameters, the
RESTORE command is automatically invoked. Use the AUTO-RESTORE command
(CONFIG, "File load/save options...", "Auto restore") to change the
auto-restore setting. The files "$window.slk" and "$command.slk"
contain the information necessary for the restore command to setup the
window sizes and previous buffer positions. The ".command" command
retrieve buffer is initialized to the contents of the "$command.slk"
file.
See also XDOS, AUTO-RESTORE, SAVE-WINDOW-CONFIG
(built-in,search): RESTORE_SEARCH search_string,flags,word_re
Restores the current search data. The built-in function SAVE_SEARCH
may be called to return the current search data which is used by the
built-in functions REPEAT_SEARCH, MARK_MATCH, and MATCH_LENGTH. Flags
is a number corresponding to the search option settings as follows:
IGNORE_CASE_SEARCH 1
MARK_SEARCH 2
POSITION_ON_LAST_CHAR_SEARCH 4
REVERSE_SEARCH 8
RE_SEARCH 16
WORD_SEARCH 32
See also REPEAT_SEARCH, MARK_MATCH, MATCH_LENGTH, SEARCH_REPLACE,
SAVE_SEARCH, SEARCH, SEARCH_CASE
(built-in,misc): RESUME
Returns execution to the statement after the last SUSPEND statement.
This function is used in conjunction with SUSPEND to check for critical
errors which halt the interpreter. Critical errors which halt the
interpreter automatically issue a RESUME. If a SUSPEND was issued,
the following statement receives control and can check the RC variable
to determine the reason for the RESUME. Before executing the RESUME
statement you will want to set the RC variable to a positive value to
distinguish your resume codes from internal error codes which are
negative.
Example
suspend /* rc is set to 0 by SUSPEND in first pass. */
if rc then
if rc=1 then /* Normal return? */
return(0)
endif
message 'Please specify floating point number'
return(1)
endif
call arg(1)+1 /* If arg(1) not float, run time error */
/* will occur. */
rc=1
resume
See also SUSPEND
(command,cmdline): RETRIEVE-NEXT
Moves the line position of the retrieve buffer ".command", one line
down and places the contents of the line on the command line. If the
current line is the last line of the buffer, the cursor is placed on
the first line and the contents of the first line are placed on the
command line. When a command is executed, the current line of the
retrieve buffer becomes the last line.
See also RETRIEVE-PREV
(built-in,cmdline): RETRIEVE_NEXT
Moves the line position of the retrieve buffer ".command", one line
down and places the contents of the line on the command line. If the
current line is the last line of the buffer, the cursor is placed on
the first line and the contents of the first line are placed on the
command line. When EXECUTE is issued, the current line of the retrieve
buffer becomes the last line.
See also RETRIEVE_PREV
(command,cmdline): RETRIEVE-PREV
Moves the line position of the retrieve buffer ".command", one line up
and places the contents of the line on the command line. If the
current line is the first line of the buffer, the cursor is placed on
the last line and the contents of the last line are placed on the
command line. When a command is executed, the current line of the
retrieve buffer becomes the last line. However, the first execution of
RETRIEVE-PREV after the command is executed will place the contents of
the last line on the command line and not move the line position.
See also RETRIEVE-NEXT
(built-in,cmdline): RETRIEVE_PREV
Moves the line position of the retrieve buffer ".command", one line
up and places the contents of the line on the command line. If the
current line is the first line of the buffer, the cursor is placed on
the last line and the contents of the last line are placed on the
command line. When EXECUTE is issued, the current line of the retrieve
buffer becomes the last line. However, the first execution of
RETRIEVE_PREV after EXECUTE is issued will place the contents of the
last line on the command line and not move the line position.
See also RETRIEVE_NEXT
(command,misc): RETURN string
Sets RC to string. Used to return a command to be executed by the MENU
command.
See also MENU
(built-in,misc): RETURN [expression]
Returns expression to caller via RC or interpreter stack.
Procedures that are defined by DEFC, DEFPROC, and DEFMAIN, require the
expression parameter. Procedures that are defined by DEFINIT and
DEFLOAD may not have the expression parameter. DEFMAIN returns its
result in RC. DEFPROC returns its result on the interpreter stack.
Depending upon how a DEFC procedure is called, it may return the result
either way. Type "help defc" on command line and press ENTER for more
information on DEFC.
(command,search): REVERSE-I-SEARCH
Starts a reverse incremental search. Searching takes place as
characters are typed. Press Ctrl-Break to terminate a long search.
The following keys take on a different definition during an incremental
search:
Ctrl-R Searches in reverse for next occurrence of search
string
Ctrl-S Searches forward for next occurrence of search
string
Ctrl-T Toggles regular expression pattern matching on/off. For
help on regular expressions, see / command.
Ctrl-W Toggles word searching on/off. See the WORD-CHARS
command for changing the definition of a word.
See also I-SEARCH
(built-in,cursor): RIGHT
Moves the text cursor one position to the right. Command cursor is not
affected. When the right edge is hit, the text area is smooth
scrolled or center scrolled. See SCROLL_STYLE.
See also LEFT
(built-in,file): RMDIR path
Removes directory specified by path. If successful, RC is set to zero.
Otherwise RC is set to one of the return codes in the file "rc.sh".
(command,keyboard): ROOT-KEYDEF
Temporarily switches to fundamental mode for the next key press. Useful
for getting to a fundamental mode key binding when the current mode
has changed the binding of that key.
(built-in,misc): RUBOUT
Deletes character if any to left of text area cursor and moves cursor
to left. When left edge is hit, text area is smooth scrolled or center
scrolled. See SCROLL_STYLE.
(command,misc): SAFE-EXIT
Exits editor. If any files need to be saved, the number of buffers
which need to be saved is displayed and you are asked whether you want
to exit any way.
(command,file): SAVE [command_line]
Writes contents of the active buffer to the file name specified. If no
file name is specified, the current buffer name is used. The
SAVE-OPTIONS command may be used to specify default options for the
SAVE command. See option meanings below.
command_line may contain an output filename and any of the
following switches:
+ or -O Overwrite destination switch (no backup). Useful
for writing a file to a device such as the
printer or saving disk space. Default is off.
+ or -Z Append end of file marker Ctrl-Z. Default is on.
+ or -T Compress saved file with tabs. Quoted strings
are left unchanged. Always uses tab
increments of 8. Default is off.
+ or -E Turn on/off expand tabs to spaces switch. Default
is off.
+ or -B Binary switch. Save file without carriage return,
line feeds, or end of file marker. Defaults to
off.
+ or -A Convert dest filename to absolute. Default is
on. This option is currently used to write files
to device names such as PRN. For example,
"save +o -a +e prn" sends the current buffer
to the printer.
+D,-D,+DK,-DK These options specify the backup style. The
default backup style is +D. The backup styles
are:
+D Write backup files to a backup directory. The
default backup directory is "\slick\backup\". You
may define an alterate backup directory by
defining an environment variable call
SLICKBACKUP. The SLICKBACKUP environment variable
must not contain a drive specifier and must end
with a '\' character. The backup file gets the
same name part as the destination file. For
example, given the destination file
"c:\project\test.c", the backup file will
be "c:\slick\backup\test.c". This option
is NOT recommended if you are running SLICK on
a NETWORK.
-D Write backup files to a directory derived from
concatenating a backup directory with
the path and name of the destination file. The
default backup directory is "\slick\backup\". You
may define an alterate backup directory by
defining an environment variable call
SLICKBACKUP. The SLICKBACKUP environment variable
must not contain a drive specifier and must end
with a '\' character. For example, given the
destination file "c:\project\test.C", the backup
file will be "c:\slick\backup\project\test.c".
For a network, you may need to create the directory
with appropriate access rights manually before
saving a file.
+DK,-DK Write backup files to a backup directory off
the same directory as the destination file.
+DK or -DK specifies this style. For example, given
the destination file "c:\project\test.c", the backup
file will be "c:\project\backup\test.c". Unlike the
other backup options, SLICK should have no problems
creating the BACKUP directory with the correct access
rights for a network.
The internal variable .modify is turned off if the output filename is
the same as the current file name. If no filename is specified the
current buffer name is used.
Example
save +O -A +E PRN - save a file to the printer
See also FILE, PRINT
(command,file): SAVE-OPTIONS +O|-O +D|-D +Z|-Z +E|-E +S|-S
The SAVE-OPTIONS command specifies the default options for the commands
SAVE and FILE. If you want different SAVE-OPTIONS for different
disk drives, define an environment variable called SLICKSAVE and
specify each drive followed by the options. For example, "SET
SLICKSAVE= a: +O b:+O" specifies no backup for floppy drives A and B.
The option letters have the following meaning:
+ or -O Overwrite destination. When on, no backup of
destination file is created. Normally a backup of
the destination file is created the first time the
destination file is overwritten.
+ or -Z Add eof character.
+ or -E Expand tabs to spaces.
+ or -S Strip trailing spaces on each line.
+D,-D,+DK,-DK These options specify the backup style. The
default backup style is +D. The backup styles
are:
+D Write backup files to a backup directory. The
default backup directory is "\slick\backup\". You
may define an alterate backup directory by
defining an environment variable call
SLICKBACKUP. The SLICKBACKUP environment variable
must not contain a drive specifier and must end
with a '\' character. The backup file gets the
same name part as the destination file. For
example, given the destination file
"c:\project\test.c", the backup file will
be "c:\slick\backup\test.c". This option
is NOT recommended if you are running SLICK on
a NETWORK.
-D Write backup files to a directory derived from
concatenating a backup directory with
the path and name of the destination file. The
default backup directory is "\slick\backup\". You
may define an alterate backup directory by
defining an environment variable call
SLICKBACKUP. The SLICKBACKUP environment variable
must not contain a drive specifier and must end
with a '\' character. For example, given the
destination file "c:\project\test.C", the backup
file will be "c:\slick\backup\project\test.c".
For a network, you may need to create the directory
with appropriate access rights manually before
saving a file.
+DK,-DK Write backup files to a backup directory off
the same directory as the destination file.
+DK or -DK specifies this style. For example, given
the destination file "c:\project\test.c", the backup
file will be "c:\project\backup\test.c". Unlike the
other backup options, SLICK should have no problems
creating the BACKUP directory with the correct access
rights for a network.
(built-in,search): SAVE_SEARCH search_string,flags,word_re
Saves the current search data. The built-in function RESTORE_SEARCH is
called with the same data to restore the search data which is used by
the built-in functions REPEAT_SEARCH, MARK_MATCH, and MATCH_LENGTH.
Flags is a number corresponding to the search option settings as
follows:
IGNORE_CASE_SEARCH 1
MARK_SEARCH 2
POSITION_ON_LAST_CHAR_SEARCH 4
REVERSE_SEARCH 8
RE_SEARCH 16
WORD_SEARCH 32
Example
search 'test'
save_search string,options,word_re
search 'xyz'
if rc then
messageNwait("Can't find xyz")
endif
restore_search string,options,word_re
repeat_search /* Repeats search for 'test' */
See also REPEAT_SEARCH, MARK_MATCH, MATCH_LENGTH, SEARCH_REPLACE,
RESTORE_SEARCH, SEARCH, SEARCH_CASE
(command,misc): SAVE-WINDOW-CONFIG
Saves the current edit session so that it may be resumed later by the
RESTORE command. Two files are created in the current directory called
"$window.slk" and "$command.slk" which contain the window
configuration, buffer positions, and command retrieve buffer. Invoke
SLICK with the "-r restore" parameters to restore the edit session.
Typically this command is called by the XDOS command to save the window
configuration, save buffer positions, save the command retrieve buffer,
and exit the editor.
See also XDOS, RESTORE, AUTO-RESTORE
(command,display): SAY string
Displays string in shell window and opens shell window if it is not
already open. Cursor is positioned on next line of screen. Useful for
testing the commands FOR-ALL, FOR-MARK, FOR-SELECT, and FOR-DIR.
Example
for-all say *L
See also SAYS, PAUSE, WRITE_XY, GET_CURSOR_XY, SET_CURSOR_XY,
FOR-ALL, FOR-MARK, FOR-SELECT, FOR-DIR
(built-in,display): SAY string
Displays string in shell window and opens shell window if it is not
already open. Cursor is positioned on next line of screen. SAY does
not return a value. The following procedures open the shell window.
expression (Where expression evaluates to program on disk), PAUSE,
SAYS, SAY
Normally opening the shell window will clear the screen and position
the cursor at the top left (0,0) of the screen. However, if the editor
has not yet performed a full screen refresh, the screen will not be
cleared.
Example
say 'Display this'
say 'Now display this below'
pause
See also SAYS, PAUSE, WRITE_XY, GET_CURSOR_XY, SET_CURSOR_XY,
SHELL_STATE
(built-in,display): SAYS string
Displays string in shell window and opens shell window if it is not
already open. Cursor is positioned after end of string. SAYS does not
return a value. The following procedures open the shell window.
expression (Where expression evaluates to program on disk), PAUSE,
SAYS, SAY
Normally opening the shell window will clear the screen and position
the cursor at the top left (0,0) of screen. However, if the editor has
not yet performed a full screen refresh, the screen will not be
cleared.
Example
says 'Display '
says 'this'
pause
See also SAY, PAUSE, WRITE_XY, GET_CURSOR_XY, SET_CURSOR_XY,
SHELL_STATE
(built-in,display): SCREEN_HEIGHT()
Returns number of character rows on physical display.
(built-in,display): SCREEN_WIDTH()
Returns character columns of rows on physical display.
(command,cursor): SCROLL-DOWN
Scrolls the text page one line up.
(command,cursor): SCROLL-LEFT
Scrolls the text page one column to right.
(command,cursor): SCROLL-RIGHT
Scrolls the text page one column to left.
(command,cursor): SCROLL-STYLE [C|S [number]]
Sets scroll style to center or smooth scrolling. If no argument is
given, the current value is placed on the command line for editing.
number specifies how close the cursor may get to the top or bottom
of the window before scrolling occurs.
Example
C Specifies center scrolling when top or bottom of
window is reached.
C 0 Specifies center scrolling when top or bottom of
window is reached.
C 3 Specifies center scrolling when cursor is within
3 lines of the top or bottom of the window.
S 2 Specifies smooth scrolling when cursor is within
3 lines of the top or bottom of the window.
(built-in,cursor): SCROLL_STYLE ['C'|'S' [number]]
If the 'C' argument is specified the scroll style is set to center
scrolling. Otherwise it is set to smooth scrolling. The scroll style
affects the position of the cursor for primitives which cause the
cursor to move to text that is not in view. number specifies how close
the cursor may get to the top or bottom of the window before
scrolling occurs. For the BOTTOM primitive, center scrolling style
will also cause the bottom line of the buffer to be centered when the
end of the bottom line is within view. Scroll style affects:
LEFT, RIGHT, UP, DOWN, RUBOUT, TAB, BACKTAB,
COMMAND_LEFT, COMMAND_RIGHT, COMMAND_RUBOUT,
SET_COMMAND, INSERT_LINE, KEYIN
and any macro procedure or command which executes one of these
primitives.
(command,cursor): SCROLL-UP
Scrolls the text page one line down.
(built-in,search): SEARCH search_string [,options[,
replace_string[, var Nofchanges]]]
Searches for search_string specified. If replace_string is specified a
prompted search and replace is performed. The number of changes is
returned in the optional Nofchanges variable. Press the Ctrl-Break key
to terminate a long search. Multiple search options having the
following meaning may be specified:
'+' Forward search
'-' Reverse search
'*' Search and replace without prompting
'<' Place cursor at beginning of string found
'>' Place cursor after end of string found
'E' Case sensitive search
'I' Case insensitive search
'M' Search within visible mark.
'R' Interprets search_string to be a regular expression.
replace_string may specify match groups with a backslash
followed by a group number 0-9. Count the left braces '{'
to determine a group number. The first match group is
"\0". See / command for syntax of regular expression.
'W' Limits search to words. Used to search and replace
variable names. The default word characters are
[A-Za-z0-9_$].
'W=regular-expression'
Specifies a word search and sets the default word
characters to those matched by the regular-expression
given.
When case sensitivity options 'E' or 'I' are not specified, the default
search case set by the SEARCH-CASE command is used. The search_string
is not interpreted as a regular expression unless the 'R' option is
specified.
Example
/* Search and replace without prompting. */
search 'pathsearch','*','path_search',Nofchanges
messageNwait(Nofchanges' changes')
/* Search and replace without prompting within the marked area. */
search 'pathsearch','*M','path_search'
See also REPEAT_SEARCH, MARK_MATCH, MATCH_LENGTH, SEARCH_REPLACE,
SAVE_SEARCH, RESTORE_SEARCH, SEARCH_CASE
(built-in,search): SEARCH_CASE(['E'|'I'])
Sets the default search case sensitivity to exact or ignore case and
returns current case sensitivity. 'E' specifies case sensitive
searching by default. 'I' specifies case insensitive searching by
default. The built-in SEARCH command will default to this case unless
the 'E' or 'I' is specified to override the default. Execute the
WRITE-STATE command to save the configuration.
See also REPEAT_SEARCH, MARK_MATCH, MATCH_LENGTH, SEARCH_REPLACE,
SAVE_SEARCH, RESTORE_SEARCH, SEARCH
(command,search): SEARCH-CASE [E|I]
Sets the default search case sensitivity to exact or ignore case. If
no argument is given the current setting is displayed on the command
line for editing. 'E' specifies case sensitive searching by default.
'I' specifies case insensitive searching by default. Execute the
WRITE-STATE command to save the configuration.
(built-in,search): SEARCH_REPLACE replace_string[,'R']
Replaces the match found by the last SEARCH or REPEAT_SEARCH with
replace_string. If the 'R' option is specified, a search for the next
string is performed with the same options and direction specified by
the last SEARCH or REPEAT_SEARCH call.
See also REPEAT_SEARCH, MARK_MATCH, MATCH_LENGTH, SEARCH,
SAVE_SEARCH, RESTORE_SEARCH, SEARCH_CASE
(command,file): SELECT-ALL
Places the character '>' in column one of all lines of the current
buffer. Used in fileman mode.
See also DIR, LIST
(command,file): SELECT-ATTR [R|H|S|A|D]
Places the character '>' in column one for all files that have the
attribute(s) specified. If more than one file attribute is given, they
must appear in the same order as the attributes column with dashes
present if necessary so that a column search match can be performed.
Used in fileman mode.
See also DIR, LIST
(command,file): SELECT-EXT extension
Places the character '>' in column one for all files that have the
extension specified. Used in fileman mode.
See also DIR, LIST
(command,file): SELECT-MARK
Places the character '>' in column one for all the marked lines. Used
in fileman mode.
See also DIR, LIST
(command,file): SELECT-REVERSE
Places the character '>' in column one for each line of the current
buffer which does not have a '>' in column one. For each line of the
current buffer which does have the character '>' in column, a space is
entered in column one. Used in fileman mode.
See also DIR, LIST
(command,misc): SET [env_var] [=] [value]
If no arguments are given, a new buffer is created and the current
environment is inserted. The current value of a single environment
variable may be retrieved by the name of the environment variable
without the '=' or value parameter. When running the SLICK shell, the
current value of the environment variable is inserted into the
'.command' retrieve buffer. To remove an environment variable, specify
the name of the environment variable followed by '=' and omit the value
parameter. To replace or insert a value for an environment variable
specify all parameters. 'set ?' will list the names of the environment
variables.
(built-in,cmdline): SET_COMMAND command_text[,column[,leftedge[,prompt[,
popup_x[,popup_y[,popup_width[,popup_color]]]]]]]
Be sure to look at the macro function GET_STRING (See module "get.s")
and the QUERY command (see help on QUERY command) which allow a macro
to read input from the user.
SET_COMMAND changes current setting of the command line. Text of
command line is set to command_text. The scroll position and cursor
position are set to leftedge and column respectively. If column is not
within view of the given leftedge, the command text is smooth scrolled
or center scrolled into view. See SCROLL_STYLE. Leftedge and Column
have range 1..MAX_LINE. If leftedge or column are out of range they
are set to MAX_LINE. The prompt parameter sets the command prompt.
The prompt width is truncated if its length is greater than
COMMAND_WIDTH -2. Prompt may only be modified by the SET_COMMAND
primitive.
The parameters popup_x, popup_y,popup_width and popup_color are ignored
if popup_x is less than zero. Otherwise these parameters specify a
pop-up command line. Parameters popup_x and popup_y have range
0..SCREEN_WIDTH()-2 and 0..SCREEN_HEIGHT() and specify the x and y
screen position of the command line. The popup_width parameter has
range 1..SCREEN_WIDTH(). The popup_color parameter maybe any color
constant from "colors.sh". Pop-up command lines do not support the
prompt parameter.
Example
command_text='dir '
set_command command_text,text_col(command_text)+1
See also COMMAND_STATE, COMMAND_TOGGLE, COMMAND_LEFT, COMMAND_RIGHT,
COMMAND_DELETE_CHAR, COMMAND_RUBOUT, EXECUTE, GET_COMMAND,
QUERY
(built-in,display): SET_CURSOR_XY x,y
Sets visible cursor coordinates to x and y. x range is
0..SCREEN_WIDTH()-1. y range is 0..SCREEN_HEIGHT()-1.
(built-in,misc): SET_ENV name [,value]
Assigns value to the environment variable name. If value is not given,
the environment variable is removed from the environment. RC is set to
'0' if successful otherwise RC is set to INTERPRETER_OUT_OF_MEMORY_RC.
See also ENV_MATCH, GET_ENV
(built-in,keyboard): SET_FKEYTEXT string[,'S'|'H'|'O']
Sets the value of the key table function key text corresponding to
"root-keys". Each key table has its own set of function key text which
may be up to 160 characters long. The options S, H, and O have the
following meaning:
S - Show fkeytext. Message line and fkeytext line are
on different lines of the screen.
H - Hide fkeytext. One line of screen is used as
the message line. fkeytext is not displayed.
O - Messages temporarily overlaps the function key
text until a key is pressed. "sticky messages"
(See STICKY_MESSAGE) do not go away
until another message is displayed.
(built-in,keyboard): SET_KEYTAB_INDEX keytab_index,key_index,index
Binds key of key table specified to a command or key table.
Example
index=find_index('COMMAND-TOGGLE')
root_keytab_index=find_index('default-keys',KEYTAB_TYPE)
/* Bind the fundamental mode escape key to command toggle */
/* root and mode key tables both point to the "default-keys" */
/* key table when in fundamental mode. */
set_keytab_index root_keytab_index,key2index(ESC),index
(built-in,keyboard): SET_KEYTAB_POINTER keytab_p,keytab_index
Sets a key table pointer to point to a key table. The name table
entries "root-keys" and "mode-keys" are key table pointers. They do
not have key table space allocated to them. Instead, they point to
another key table entry such as "default-keys" or "fileman-keys".
Example
mode_keytab_p=find_index('mode-keys',KEYTAB_TYPE)
keytab_index=find_index('default-keys',KEYTAB_TYPE)
/* Set the mode keys to point to the fundamental key table. */
set_keytab_pointer mode_keytab_p,keytab_index
(built-in,name): SET_NAME_CLASS index, class
Replaces class, corresponding to name table index. Class must be a
whole number. If index is not a valid index, the interpreter is
halted. Class may be changed for any name type except for modules and
key tables.
See also FIND_INDEX, NAME_MATCH, NAME_NAME, NAME_TYPE, NAME_INFO
NAME_HELP, SET_NAME_HELP, FIND_LINK, CALL_LINK, INSERT_NAME,
SET_NAME_INFO, NAME_CLASS, DELETE_NAME
(built-in,name): SET_NAME_HELP index,whole_number
Sets help number corresponding to name table index. Usually
whole_number is a buffer pointer into "slick.doc". As soon as the
buffer is modified all points to it are invalid. When "slick.doc" is
modified, all the buffer pointers are rebuilt. If index is not a valid
index, the interpreter is halted.
Example
load_files "slick.doc"
search ' SET_NAME_HELP','e' /* Exact case search. */
get_line line
parse value line with '(' type ',' class ')'
index= find_index('set-name-help',eq_name2value(type,HELP_TYPES))
if not index then /* name not present */
call insert_name('set-name-help',HELP_TYPE);
endif
set_name_help index,point()
set_name_class,index,eq_name2value(class)
See also POINT, GOTO_POINT, NAME_HELP, NAME_CLASS
SET_NAME_CLASS
(built-in,name): SET_NAME_INFO index, info
Replace info, corresponding to name table index. If index
is not a valid index, the interpreter is halted. Info may be changed
for any name type. Upon successful completion RC is set to 0.
Otherwise RC is set to INTERPRETER_OUT_OF_MEMORY_RC and message will get
displayed after macro finished unless CLEAR_MESSAGE is called.
See also FIND_INDEX, NAME_MATCH, NAME_NAME, NAME_TYPE, NAME_INFO
NAME_HELP, SET_NAME_HELP, FIND_LINK, CALL_LINK, INSERT_NAME,
NAME_CLASS, SET_NAME_CLASS, DELETE_NAME
(command,misc): SET-NEXT-ERROR
Sets the NEXT-ERROR commands start search position to the cursor in the
concurrent process buffer. For DOS, this command is not useful since
the cursor position in the '$errors.tmp' file is the same position used
by the NEXT-ERROR command to start searching. For OS/2, the NEXT-ERROR
command keeps an invisible mark in the concurrent process buffer called
".process".
See also RESET-NEXT-ERROR, CURSOR-ERROR, NEXT-ERROR
(built-in,cursor): SET_SCROLL_POS left_edge,cursor_y
Sets the left edge scroll position and the cursor y position for
viewing the current line. The current line is unchanged. The
internal-variable ".cursor_y" may also set the cursor y position
however the current line will not remain the same.
(command,misc): SET-VAR variable [new_value]
Retrieves or sets the value of a UNIVERSAL variable. The value is
retrieved if the new_value parameter is omitted.
(built-in,misc): SET_VAR index,value
Sets the contents of the variable corresponding to the name table
index given to value.
Example
/* VAR_TYPE is defined in "slick.sh" */
index=find_index('rc',VAR_TYPE)
set_var index,'anything'
message 'rc='get_var(index)
See also GET_VAR
(command,misc): SETUPEXT
The SETUPEXT command (CONFIG, "File extension setup...") runs the
external macro "setupext.s". A list of extensions are presented that
already have setup information for mode name, tab options, word wrap
options, compile command, begin/end pairs, and mode key table name.
Files with extension not contained in the list get the fundamental
extension setup values. The setup information is activated when the
buffer is loaded with the EDIT command. The setup fields are:
MODE NAME Appears on far right of status line. Helps
remind you what extension specific setup is
active for the current buffer.
TABS Tab stops have the syntax:
[+] t1 [+] t2 [+] t3 ... [+] t30
Examples
1 4 7 10 13 16 - Creates tab stops 1 4 7 10 13 16
+3 - Creates tab stops 1 4 7 ... 88
1 49 +3 - Creates tab stops 1 4 7 ... 49
1 49 +3 53 250 +4 - Creates tab stops 1 4 7 ... 49 53
57 61 65 69 ... 101
10 +3 - Creates tab stops 10 13 16 ... 97
MARGINS Syntax for margins:
left right [new-paragraph]
The first line of a paragraph gets the
indent value specified by new-paragraph.
Examples
5 70 - Set margins to 5 70 5
5 70 10 - Set margins to 5 70 10
WORD WRAP [Yes,No] If yes, the editor attempts to keep
the cursor within the margins when
entering text, moving the cursor, and
deleting characters.
JUSTIFY [Y,N,U] Sets the space handling of the
REFLOW-PARAGRAPH and REFLOW-MARK command.
Options mean:
Y Left and right justify paragraphs.
N Respect spaces placed between words.
Left justify only.
U Left justify paragraphs placing
one space between words accept after
the punctuation characters ".?!" which
get two spaces.
IMPORTANT
If JUSTIFY is set to N, the save options
should be set to -S so that trailing spaces
are not stripped from the end of each line
when a file is saved. See SAVE-OPTIONS
command.
INDENT WITH TABS [Y,N] Determines whether ENTER key command and
paragraph reformat commands indent with
spaces or tabs. If you do not want your
ENTER key to indent the cursor, use the
AUTO-INDENT command.
SHOW TABS [Y,N,E] Determines whether tab characters are
expanded to the appropriate number of
spaces when displayed on screen.
The option letters have the following meaning:
Y Display tab characters without expanding them.
E Expand tabs to spaces but display first character
as a tab character instead of a space.
N Expand tabs to spaces.
COMPILE COMMAND A compile command for this file type which
gets invoked when the COMPILE command is
executed. If the compile command starts
with a number, this number is assumed to be
the amount of memory the compiler needs to
run. A memory value of 0 specifies
that SLICK allocate as much memory as
possible. Parts of the buffer name may be
parsed into the compile command before it is
executed. The rules for substituting parts
of buffer name into the compile command
are:
* Buffer name
*p Path of buffer name with backslash
*d Drive with : of buffer name
*n Buffer name without extension or path
*f Buffer name without path
*e Buffer name extension without dot
** Star
Examples
325 tcc *
400 cl -c *
BEGIN/END PAIRS Languages such as MODULA, PASCAL and SLICK
which have BEGIN/END pairs can take advantage
of this feature. You specify the pairs
similar to a regular expression. When you
place the cursor on the begin or end keyword
of the pair, invoke the command
FIND-MATCHING-PAREN (initially bound to A-T)
to find the match of the pair. The examples
below illustrate the syntax for defining the
BEGIN/END pairs.
Note: Begin/end pair matching is case
sensitive by default. Append
";I" to ignore case.
Example
(loop)|(endloop) (for)|(endfor) (do)|(end)
(while)|(endwhile) (if)|(endif);I
These BEGIN/END pairs are
for the SLICK language. Each
keyword must have parenthesis.
The begin keyword is first
followed by the '|' character
followed by the end keyword.
(begin),(case)|(end);I These BEGIN/END pairs are
for the PASCAL language.
The PASCAL language requires a
more sophisticated expression.
This expression indicates the
keywords BEGIN or CASE start a
block and the keyword END
terminates the block. Note that
',' is used instead of the '|'
operator.
(#ifdef),(#ifndef),(#if)|(#endif)
These BEGIN/END pairs are
for the C language. The C
language has the added
complication that #if is a
sub-string of #ifdef. Due
to the implementation of
begin/end matching, #ifdef must
appear before #if.
INCLUDE DIRECTORIES Specifies the directories or environment
variable containing directories to search for
include files. See CURSOR-ERROR command. If
the string entered contains an '=' sign, it
is assumed to specify an environment
variable. If nothing is specified, 'INCLUDE='
is assumed.
Example
c:\include;c:\more Look in these directories.
INCLUDE= Look in directories specified
by INCLUDE environment var.
KEY TABLE NAME Specifies name of a mode key table. If the
key table does not exist it is created. When
you switch to this mode, use the BIND-TO-KEY
command with the -m option to bind keys to
this mode key table.
(command,misc): SHELL
Runs the SLICK shell. The SLICK shell provides almost all the command
line capabilities of the SLICK editor command line. The internal
commands E, EDIT, SET, and START are recognized. If the command S is
entered it is translated into the EDIT command. Type EXIT or press an
escape key to leave shell. Editing a file will also exit the shell.
(built-in,misc): SHELL_STATE()
Returns 1 if the shell window is open. Otherwise zero is returned.
(command,mark): SHIFT-MARK-LEFT
Deletes left edge of visible marked area. Supports line and block
marks only.
(built-in,mark): SHIFT_MARK_LEFT [mark_id]
Deletes characters at left edge of marked area specified. Supports
line and block marks only.
(command,mark): SHIFT-MARK-RIGHT
Inserts space character at left edge of visible marked area. Supports
line and block marks only.
(built-in,mark): SHIFT_MARK_RIGHT [mark_id]
Inserts space character at left edge of marked area specified.
Supports line and block marks only.
(built-in,mark): SHOW_MARK mark_id
Makes the mark corresponding to mark_id visible. If mark_id is not
valid RC is set to INVALID_MARK_RC. Currently only one mark may be
showing at a time.
(command,display): SHOW-TABS [Y|N|E]
Determines whether the current buffer expands tabs to spaces when
displaying the buffer. If no parameter is given, the current value is
displayed. The option letters have the following meaning:
Y Display tab characters without expanding them.
E Expand tabs to spaces but display first character
as a tab character instead of a space.
N Expand tabs to spaces.
Each buffer has its own show tabs setting. To set the
default show tabs style for specific file extensions, invoke the CONFIG
menu (F5) and select "File extension setup...".
(built-in,keyboard): SIGNAL_HANDLER('B'[,index])
Returns index of current signal handler for specified signal.
Currently this function only supports the 'B'=Ctrl-Break signal.
Specifying the index parameter will set the signal handler. Valid
values for index must be less than or equal to 0. If index is 0, the
default signal handler is used which halts SLICK batch/macros that are
running. If index is less than 0, the Ctrl-break signal is ignored.
When this function is completed, index may correspond to a procedure to
call.
(command,file): SIMPLE-COPY source_file dest_file
Copies source_file to dest_file. RC is set to the return code. No
message is displayed in the case of an error. Used by file manager.
Use the DOS copy command for copying files when not in the file
manager.
(command,file): SIMPLE-MOVE source_file dest_file
Moves source_file to dest_file. RC is set to the return code. No
message is displayed in the case of an error. Used by file manager.
(command,misc): SLICK-ENTER
New binding of ENTER key when in SLICK mode. Handles syntax expansion
and indenting for files with S, SH, or CMD extension. See config menu
to change syntax expansion and indenting options.
(command,misc): SLICK-MODE
Activates SLICK file editing mode. The ENTER and SPACE BAR bindings
are changed as well as the tab and margin settings.
(command,misc): SLICK-SPACE
New binding of SPACE key when in SLICK mode. Handles syntax expansion
and indenting for files with S, SH, or CMD extension. See config menu
to change syntax expansion/indenting options.
(command,buffer): SORT-BUFFER [options]
Sorts the current buffer in ascending order or descending order in case
sensitivity specified. Sort defaults to ascending and case sensitive.
Multiple options having the following meaning may be specified:
A Sort in ascending order
D Sort in descending order
I Case insensitive sort (Ignore case).
E Case sensitive sort (Exact case).
Example
sort-buffer - Sort in ascending order and exact case.
sort-buffer I - Sort in ascending order and ignore case.
sort-buffer DI - Sort in descending order and ignore case.
See also SORT-ON-MARK, SORT-WITHIN-MARK
(built-in,mark): SORT_MARK [options[,mark_id]]
Sorts the mark specified in ascending or descending order in case
sensitivity specified. Sorting defaults to ascending and case
sensitive. If the buffer containing the specified mark is active when
this function is invoked, the resulting lines are inserted after the
end of the mark. Otherwise the resulting lines are inserted after the
cursor. Character mark is not supported.
Multiple options having the following meaning may be specified:
'A' Sort in ascending order
'D' Sort in descending order
'I' Case insensitive sort (Ignore case).
'E' Case sensitive sort (Exact case).
Example
sort_mark /* Sort in ascending order and exact case. */
sort_mark 'I' /* Sort in ascending order and ignore case. */
sort_mark 'DI' /* Sort in descending order and ignore case. */
(command,mark): SORT-ON-MARK [options]
Sorts the marked text by comparing only the columns specified. Sort
may be in ascending or descending order and case sensitive or case
insensitive. Supports line and block marks only. Sort defaults to
ascending and case sensitive.
Multiple options having the following meaning may be specified:
A Sort in ascending order
D Sort in descending order
I Case insensitive sort (Ignore case).
E Case sensitive sort (Exact case).
Example
sort-on-mark - Sort in ascending order and exact case.
sort-on-mark I - Sort in ascending order and ignore case.
sort-on-mark DI - Sort in descending order and ignore case.
See also SORT-BUFFER, SORT-WITHIN-MARK
(command,mark): SORT-WITHIN-MARK [options]
Sorts the text within the marked area in ascending order. Sort may be
in ascending or descending order and case sensitive or case
insensitive. Supports line and block marks only. Sort defaults to
ascending and case sensitive.
Multiple options having the following meaning may be specified:
A Sort in ascending order
D Sort in descending order
I Case insensitive sort (Ignore case).
E Case sensitive sort (Exact case).
Example
sort-within-mark - Sort in ascending order and exact case.
sort-within-mark I - Sort in ascending order and ignore case.
sort-within-mark DI - Sort in descending order and ignore case.
See also SORT-BUFFER, SORT-WITHIN-MARK
(command,file): SPILL-FILE-PATH [path]
When path is given, the default spill file path is set to path. If the
spill file has already been created due to insufficient memory, this
function has no effect on this session. To get the current setting for
the spill file path, specify no argument. Issue the "write-state"
command to save the spill file path for the next session.
(built-in,file): SPILL_FILE_PATH([path])
Returns the default path for the editor spill file. When path is
given, the default spill file path is set to path. If the spill file
has already been created due to insufficient memory, this function has
no effect on this session. Issue the "write-state" command to save the
spill file path for the next session.
(command,misc): SPLIT-LINE
Splits the current line at the cursor position. Enough spaces are
appended to the beginning of the new line to align it with the first
non blank character of the current line.
(command,window): SPLIT-WINDOW
Splits the current window horizontally in half.
See also VERTICAL-SPLIT-WINDOW
(command,misc): ST [module_name]
Compiles the module specified. If no name is specified and the current
buffer has the extension S or CMD, the current module is saved (if
necessary) and compiled.
(command,misc): START ["message"] command
Starts a new session setting the current directory to be the same as
the current working directory and initializing the environment by
executing the OS/2 batch file "OS2INIT.CMD" before executing the
command specified. This command supports OS/2 mode only. If the first
argument is a quoted string, the new session will have that title.
Otherwise the session title will be the command. The command given may
be any internal or external command.
Example
start list \ Start file manager in a new session
start shell Start slick shell in a new session
start make Start make program in a new session
start "compiling project" make Start make program in a new session
with title "compiling project".
(command,keyboard): START-KBD-MACRO
Starts a new keyboard macro definition. All key strokes will be
remembered until , KBD-MACRO-TOGGLE (Ctrl-R), KBD-MACRO-END-EXECUTE
(Ctrl-T), or END-KBD-MACRO (Ctrl-X ')') is executed or the macro
overflows the maximum size of 255 bytes. Once key stroke recording
stops, the keyboard macro is given the default name 'last-kbd-macro'.
See also END-KBD-MACRO, KBD-MACRO-TOGGLE, NAME-MACRO,
KBD-MACRO-END-EXECUTE
(built-in,keyboard): START_KBD_MACRO
Starts a new keyboard macro definition. If GET_MACRO is called
after START_KBD_MACRO is executed, RC will be zero and '' will be
returned. All key strokes will be remembered until END_KBD_MACRO
is executed or the macro overflows the maximum size.
See also NAME_MACRO, GET_MACRO, END_KBD_MACRO.
(command,misc): START-PROCESS
This functions supports OS/2 only. Starts the OS/2 command processor
CMD.EXE running in a newly created buffer. The commands BOTH-UP,
BOTH-DOWN, BOTH-RUBOUT, BOTH-KILL-LINE BOTH-NOSPLIT-INSERTLINE,
BOTH-SPLIT-INSERTLINE, BOTH-MAYBE-SPLIT-INSERTLINE, BOTH-BEGIN-LINE,
BOTH-BEGIN-LINE-TEXT-TOGGLE operate like the SLICK command line when
prompted for input. BOTH-UP and BOTH-DOWN support command retrieval in
a new buffer called '.process-command'. Each copy of the SLICK editor
can run one concurrent session. If two copies of the SLICK editor are
running in the same session only one may have a concurrent session
running because OS/2 only allows one process within a session to be the
parent of another session.
See also STOP-PROCESS, NEXT-ERROR, EXIT-PROCESS, SET-NEXT-ERROR
RESET-NEXT-ERROR, CURSOR-ERROR
(built-in,display): STICKY_MESSAGE string
If the shell window is open, string is displayed in the shell window.
Otherwise string is displayed on the message line. Message will
remain on the message line until another message is displayed.
See also MESSAGE
(built-in,misc): STOP
Halts the command currently running. If the command is an external
command (extension '.s' or '.cmd'), the module is unloaded and the
previous command is resumed.
See also EXIT, SUSPEND, RESUME
(command,misc): STOP-PROCESS
Sends a Ctrl-Break signal to the concurrent session created by the
START-PROCESS command. This command supports OS/2 mode only.
See also START-PROCESS, NEXT-ERROR, EXIT-PROCESS, EXIT-PROCESS,
SET-NEXT-ERROR, RESET-NEXT-ERROR, CURSOR-ERROR
(built-in,misc): STOP_PROCESS
Sends a Ctrl-Break signal to the concurrent session created by the
built-in function CONCUR_SHELL.
See also CONCUR_SHELL, PROCESS_INFO
(misc,language): STRINGS
Strings may be in single or double quotes. If single quotes are used,
two single quotes consecutively represents one single quote character.
If double quotes are used, two double quotes consecutively represents
one double quote character.
Example
""""== '"'
''''== "'"
A backslash (not inside quotes) followed by a character or a number has
the the special meaning indicated below:
\n new line
\r carriage return
\t tab
\b backspace
\f Form feed
\xdd Hex character code dd
\ddd Decimal character code ddd
Quoted strings adjacent to escape sequences are read (lexed) as one
string. No concat is performed.
Example
\n==\10
\r==\xd
\r==\x0d
'1'\50 + '1'\49== '23' /* 12 + 11=='23', not 1||(2+1)||1=='131'*/
(built-in,string): STRIP(string[,ltb,[strip_char]])
Strips string of leading and/or trailing strip_char. If strip_char
is not given, tabs and spaces are stripped. ltb may be one of 3
values with the following meaning:
'L' - remove leading strip_char
'T' - remove trailing strip_char
'B' - remove leading and trailing strip_char.
By default, leading and trailing tabs and blanks are removed.
strip(' abc ','L') == 'abc '
strip(' abc ','T') == ' abc'
strip(' abc ') == 'abc'
strip(' '\t'abc '\t) == 'abc'
strip(' '\t'abc '\t,'L') == 'abc '\t
strip(' '\t'abc '\t,'B',' ') == \t'abc '\t
(command,file): SUBCOPY source_file dest_directory
Copies the source_file to dest_directory concatenated to
path_no_drive(source_file). Preserves directory structure.
Destination directory is created if it does not exist. Disk is
formatted if necessary. Handles errors necessary for backing up a
file. Used in fileman mode.
(built-in,string): SUBSTR(string,start[,length[,pad]])
Returns length characters of string beginning at start. By default,
length defaults to rest of string. If length is greater than length of
string, the return string is padded with blanks or pad character if
specified. start must be a positive whole number.
Example
substr('test',2) == 'est'
substr('test',1,5) == 'test '
substr('',1,5,'*') == '*****'
substr('test',2,4) == 'est '
(misc,help): SUMMARY-OF-KEYS
Notation C-, A-, and S- abbreviate Ctrl-,Shift-, and Alt-
Inserting text
Ins,C-O Insert/overwrite toggle C-X tab Move text tab
Enter Insert a line C-Q Quote next character typed
A-N Insert buffer name A-S Split line at cursor
Deleting text
Del,C-D Delete char under cursor C-E Cut to end line(s)
Backspace Delete char before cursor A-W Cut word(s)
C-Backspace Cut line(s) A-J Join line to cursor
File and buffers
F2,C-X C-S Save current buffer C-X C-B List buffers
F3,C-X 'K' Quit current buffer F8,C-B Next buffer
F4 Save & Quit current buffer A-F8,C-V Previous buffer
F7, C-X 'F' Edit a file or find buffer C-X 'B' Find buffer
Clipboard
A-V Copy mark to clipboard C-Backspace Cut line(s)
C-X C-W Copy word to clipboard C-E Cut to end line(s)
C-X C-Y Paste any clipboard A-W Cut word(s)
C-Y Paste last clipboard A-K Cut mark
A-V Copy to clipboard
Mark
A-B Mark block/column S-F7 Shift mark left
A-L Mark line S-F8 Shift mark right
A-Z Mark character/stream C-F3 Upcase mark
A-U Unmark C-F4 Lowcase mark
A-C Copy Mark A-A Move/overlay block
A-K Cut mark A-O Overlay block mark
A-M Move mark A-E Go to end of mark
A-F Fill mark A-Y Go to beginning of mark
C-X C-P Reflow mark A-= Execute commands in mark
Compiling and programming support
A-F5 Make project C-C Stop concurrent process
A-F6 Compile current buffer C-X C-M Start concurrent process
A-F10,C-X C-N Next error C-H Find tag or proc
C-X C-L Make and load current macro buffer
Searching
C-F Repeat last search
C-S Incremental search C-X C-R Reverse increment search
C-Break Stops search or search and replace.
Windowing
A-F1 Change window C-X '2' Split window horizontally
A-F2 Move window edge C-W,C-X 'O' Next window
A-F3 Create window edge C-Z,C-X '1' One window
A-F4 Delete window edge
Macros
C-R Start/end kbd macro def. C-X 'E' Run last kbd macro
C-T Terminate & run last kbd macro C-X '(' Start kbd macro
C-X C-L Make and load current buffer C-X ')' End kbd macro
C-Break Halts SLICK macros that do not
handle the break signal.
Cursor movement
Left arrow,C-J Cursor left PgUp,C-P Page up
Right arrow,C-L Cursor right PgDn,C-N Page down
Up arrow,C-I Cursor up C-Left Previous word
Down arrow,C-K Cursor down C-Right Next word
C-Home,C-X C-U Top of buffer C-PgUp Top of window
C-End,C-X C-J Bottom of buffer C-PgDn Bottom of window
Home, C-U Begin line Tab Next tab stop
End,C-M End line S-Tab Previous tab stop
Command line
Esc,C-A Cursor to command line toggle A-N Insert buffer name
Up arrow Retrieve previous command C-Right Next word
Down arrow Retrieve next command C-Left Previous word
' ' Complete argument C-F1 Upcase word
'?' List arguments C-F2 Lowcase Word
Ins,C-O Insert/overwrite toggle C-F5 Capitalize word
C-Q Quote next character A-W Cut word(s)
C-X C-W Copy word to clipboard C-E Cut to end line(s)
C-Y Past last clipboard C-Backspace Cut line(s)
C-X C-Y Paste any clipboard
Miscellaneous
A-X,C-X C-C Safe exit S-F1 Scroll up
Esc,C-G Cancel S-F2 Scroll down
F1 Help for mode or context S-F3 Scroll left
F5 Configuration menu S-F4 Scroll right
F9 Restore current line S-F5 Center line
F10 Main menu for mode C-F1 Upcase word
A-S Split line C-F2 Lowcase word
A-J Join line C-X C-E Slick shell
A-P Reflow paragraph C-X C-X Nothing
A-R Fundamental mode for next C-F5 Capitalize word
key press
(built-in,misc): SUSPEND
Pushes a new level for a signal handler. After a SUSPEND has been
executed, errors which halt the interpreter will set the variable RC to
the error code and RESUME execution at the first statement after
SUSPEND. The RESUME function restores the interpreter stack and code
position to the state it was in after the last SUSPEND was executed.
Be sure to execute RESUME to restore the previous signal handler.
Example
suspend
if rc then
if rc<0 then
message get_message(rc)
return(rc)
endif
return(0)
endif
i=arg(1)+1 /* Handle invalid number argument */
message 'i='i
rc=1;resume
See also SIGNAL_HANDLER
(command,misc): SYNTAX-INDENT tab_amount
Sets 30 tab stops in increments of the tab amount specified for all
modes except fundamental, fileman, and assembly
(built-in,cursor): TAB
Places cursor at next tab stop if any. If column is not in view,
column is center scrolled or smooth scrolled into view. See
SCROLL_STYLE. Each buffer has its own tab stops.
See also BACK_TAB, INTERNAL-VARIABLES, TABS, SETUPEXT
(command,file): TAB-EXT [file_extensions]
Specifies the file extensions which should have spaces compressed with
tab characters when the SAVE command is executed. Files saved with
tabs (especially assembler files) take up less disk space than files
saved with out tabs. Tab compression increases the save time by about
15%. Tab compression of a line stops when a quote is seen. Lines that
are part of a line continuation from the previous line (last character
of line is '\\') are not tabbed. The editor does not expand tabs when
loading unless the load options contain the +E option (See LOAD-OPTIONS
command). Indexed files such as "slick.doc" and "slick.mnu" may not be
saved with tabs.
Example
tab-ext .asm - Compress assembler files with tabs
(command,misc): TABS [+] t1 [+] t2 [+] t3 ... [+] t30
Sets up to 30 tab stops in increasing order. The commands BOTH-TAB and
BOTH-BACKTAB may be used to move between tab stops. The '+' symbol is
used to set tabs according to an increment value.
Example
tabs 1 4 7 10 13 16 - Creates tab stops 1 4 7 10 13 16
tabs +3 - Creates tab stops 1 4 7 ... 88
tabs 1 49 +3 - Creates tab stops 1 4 7 ... 49
tabs 1 49 +3 53 250 +4 - Creates tab stops 1 4 7 ... 49 53 57 61
65 69 ... 101
tabs 10 +3 - Creates tab stops 10 13 16 ... 97
See also BOTH-TAB, BOTH-BACKTAB, BOTH-MOVE-TEXT-TAB
(built-in,keyboard): TESTKEY([options])
options defaults to '' and may be 'R' and/or 'K' and/or 'C'
'R' - Specifies no screen refresh
'K' - Physical keyboard is tested and not
a keyboard macro that is running.
'C' - Limit refresh to command line only. Used by
GET_STRING macro function to refresh text
in popup command line.
Tests to see if a key is available. If a key is ready, a string
representation of the key is returned. If no key is available, '' is
returned. For ASCII keys a string of length 1 is returned except for
C_ENTER, C_BACKSPACE, ENTER, TAB, BACKSPACE, and ESC. For these
special keys and extended keys like A_L, a string of length 2 is
returned. This separation allows the control keys C_J, C_H, C_M, and
C_I to have a different binding from the keys listed above. This
function will test keys from a keyboard macro that is running unless
option 'K' is specified. If 'R' and 'C' options are not given, the
screen is refreshed and the shell window is closed. The shell window
is opened when an external program is executed or by the built-in
primitives SAY, SAYS, and PAUSE.
See also GETKEY, TESTKEY, LASTKEY, RAW_LASTKEY, CALL_KEY,
KEY2NAME, KEY2INDEX, INDEX2KEY, LIST_BINDINGS,
KEYTAB_INDEX, SET_KEYTAB_POINTER
(built-in,string): TEXT_COL(string[,column[, 'P'|'T'|'L'|'I']])
column does not have a default value
third parameter defaults to 'L'
Converts an imaginary column position to a physical string column
position and visa versa. The input and output values are described
by the table below:
Third param. Input column Output column
'P' imaginary Physical
'T' imaginary Physical. Position
is negated if the
imaginary column input
corresponds to the middle
of a tab character.
'L' Doesn't matter Imaginary length of string.
'I' Physical Imaginary
start
The input column is returned if input column is less than or equal to
zero and third parameter is not 'L'.
We use the term imaginary to describe column positions which correspond
to a string as displayed on your screen. Strings containing tab
characters are expanded before displayed. Hence, the need arises for a
differentiation between physical and imaginary positions. A physical
position corresponds to a character in string. The characters are
numbered one to the length of string. An imaginary position
corresponds to a position in a string once tabs have been expanded.
Example (Assume tabs are 1 9 17 25 33 41 ... (increments of 8))
text_col('abc'\t'def'\t'ghi') == 19
text_col('abc'\t'def'\t'ghi',12,'P') == 8
text_col('abc'\t'def'\t'ghi',13,'P') == 8
text_col('abc'\t'def'\t'ghi',12,'T') == 8
text_col('abc'\t'def'\t'ghi',13,'T') == -8
text_col('abc'\t'def'\t'ghi',8,'I') == 12
text_col('abc'\t'def'\t'ghi',-1,'P') == -1
text_col('abc'\t'def'\t'ghi',0,'P') == 0
text_col('abc'\t'def'\t'ghi',0,'I') == 0
see also EXPAND_TABS
(built-in,cursor): TOP
Places cursor at first line and first column of buffer
See also BOTTOM
(command,cursor): TOP-OF-BUFFER
Places cursor at first line and first column of buffer. If the
"Preserve column on top/bottom..." option is set to "Y", the cursor is
placed on the first line of the buffer and the column position is
unchanged. Executing this command when the cursor is already on the
first line of the buffer will move the cursor to the first column of
the first line. The "Preserve column on top/bottom..." option is
accessible through the CONFIG menu (F5) under "Other options...".
See also BOTTOM-OF-BUFFER
(command,cursor): TOP-OF-WINDOW
Places cursor at top of window.
See also BOTTOM-OF-WINDOW
(built-in,misc): TRACE
Reserved word.
(built-in,string): TRANSLATE(string[,output_table[,input_table[,pad]]])
Translates characters in string that are in the input_table to the
corresponding character in the output table. If the length of
input_table is greater than the length of output_table, output_table is
padded with the pad character given. Pad character defaults to ''. If
output_table is not given, string is converted to upper case.
Example
translate('bottom_of_window','-','_') =='bottom-of-window'
translate('bottom_of_window','','_','*') =='bottom*of*window'
translate('bottom_of_window') =='BOTTOM_OF_WINDOW'
(command,keyboard): UNBIND-KEY [-r | -m]
Unbinds the next key you press. Normally a mode key table binding
takes precedence over a root key table binding. When the mode key
table has no binding for the key, the root key table binding is
selected to be unbound. The -r and -m options may be used to select
key bindings to the root or mode key table.
See also BIND-TO-KEY
(command,misc): UNDO-LINE
Restores the current line to its original value before the cursor moved
onto it.
(built-in,misc): UNDO_LINE
Restores the current line to its original value before the cursor moved
onto it.
(command,mark): UNINDENT-MARK
Deletes the characters in marked area before the first tab stop not
equal to one. A check is performed to insure that the characters
deleted are space or tab characters. Supports line mark only. Lines
of text may be marked with the MARK-LINE command (Alt-L).
See also INDENT-MARK
(misc,language): UNIVERSAL
Declares a variable of the scope "universal". Universal
variables may be access by any module currently loaded and may be saved
from session to session by the WRITE-STATE command.
Syntax
UNIVERSAL
variable [= initial_expression] [',']
variable [= initial_expression] [',']
....
The comma is used to declare universal variables on one line.
If a loaded module which declares a new universal variable its initial
value is set to the value initial_expression. If initial_expression is
not given a new universal variable is initialized to ''.
(command,file): UNLIST-ALL
Deletes all lines of the current buffer. The lines may be retrieved
with the command BOTH-YANK. If the visible mark is not in the current
buffer it is preserved. Used in fileman mode
(command,file): UNLIST-ATTR R|H|S|A|D
Deletes lines of files with the specified attribute(s). If more than
one file attribute is given, they must appear in the same order as the
attributes column with dashes present if necessary so that a column
search can be performed. Used in fileman mode
(command,file): UNLIST-EXT extension
Deletes lines of files with the specified extension. Used in
fileman mode.
(command,file): UNLIST-SEARCH search_string
Prompted search and delete line. Used in fileman mode.
(command,file): UNLIST-SELECT
Lines beginning with the character '>' are deleted. Used in fileman
mode.
(command,misc): UNLOAD module_names
Unloads modules specified. If the module is currently running it may
not be unloaded. Do not specify a path for module_names.
See also LOAD
(command,mark): UNMARK
Clears the visible mark.
(built-in,mark): UNMARK [mark_id]
Clears mark specified.
(built-in,cursor): UP [number|[, stop_column]]
Moves cursor number of lines up. If number is not given a value of '1'
is used. If line is not in view, line is center scrolled or smooth
scrolled into view. See SCROLL_STYLE. If top of buffer is hit RC is
set to TOP_OF_FILE_RC. Otherwise, RC is set to 0. Use the
"window_overlap" flags with the LIST_OVERLAP (in "slick.sh") flag to
automate display of a bounce bar. If stop_column is specified, the UP
primitive stops when a line of length greater than or equal to
stop_column is reached or until number of lines are scrolled.
Parameter two is useful for detecting lines that are too long to be
printed on a printer.
Example
up
if rc=TOP_OF_FILE_RC then
message get_message(rc)
endif
See also UP, DOWN
(built-in,string): UPCASE(string)
Returns string converted to upper case.
Example
upcase('ABc') == 'ABC'
upcase('abc') == 'ABC'
See also UPCASE
(command,mark): UPCASE-MARK
Translates characters within visible mark into upper case. Text may be
marked with one of the commands MARK-CHAR (Alt-Z), MARK-LINE (Alt-L),
or MARK-BLOCK (Alt-B).
See also LOWCASE-MARK
(built-in,misc): VAR_OFS(var name)
Returns a handle to the variable name in the form '&nnnn' where nnnn is
the handle of the variable. The built-in function INT86X translates
strings of the form '&nnnn' into the physical offset of the variable.
See also VAR_SEG, INT86X, PEEK, POKE
(built-in,misc): VAR_SEG(var name)
Returns a handle to the variable name in the form '$nnnn' where nnnn is
the handle of the variable. The built-in function INT86X translates
strings of the form '$nnnn' into the physical segment of the variable.
See also VAR_OFS, INT86X, PEEK, POKE
(built-in,string): VERIFY(string,reference[,option[,start]])
option defaults to ''
start defaults to 1
If option =='', this function returns the first character position in
string which is not one of the characters in reference. If string is
only composed of characters from reference, then 0 is returned.
If option == 'M' , this function returns the first character position
in string which matches one of the characters in reference. If no
characters in reference match a character in string, 0 is returned.
Example
verify("test.*","*?",'M') ==6
verify("?*st.*","*?",'M',3)==6
verify("?*st.*","*?") ==3
(command,misc): VERSION
Displays version of editor.
(command,window): VERTICAL-SPLIT-WINDOW
Splits the current window vertically in half.
See also SPLIT-WINDOW
(command,keyboard): WHAT-IS
Displays help for the command that is bound to the next key you press.
(command,keyboard): WHERE-IS command
Displays key(s) that are bound to command.
(built-in,display): WINDOW 'O'|'C'|'F'|'H'
The options have the following meaning:
'O' Open window. Refreshes current window, clears
all other refresh areas except the message line, and
saves text underneath window. This primitive is used
to speed up display of popdown menus from a horizontal
menu.
'C' Close window. Restores text underneath window, and
clears all other refresh areas except the message
line. This primitive is used to speed up display of
popdown menus from a horizontal menu.
'F' Frees memory allocated by 'O' option. The 'C' close window
option automatically frees the memory as well.
'H' Update horizontal menu line. and clears all other refresh
areas except the message line.
(command,window): WINDOW-BORDER 1|2|3|4
Sets the window border characters. 1=┼, 2=╬, 3=╪, 4=╫
(misc,language): WINDOWS-STRUCTURE
This help item describes the internal data structure the editor uses to
keep track of windows,buffer positions, and buffer data. You need not
read this unless you want to write a SLICK language macro which
manipulates windows, views, and buffers.
This is a picture of the windows structure with 3 windows and 4
buffers. The 2 buffers in window group g0 are ".killed" and
".command". The active window group is g1. The two windows w1 and w2
are being displayed on the screen.
{g0}════[w0] Symbols
║ ║ {} window group
║ <v0>══<v1> [] window
║ │ │ <> view
You ║ v v () buffer
are ║ (b0) (b1) ══ Points both ways
Here-> {g1}════[w1]═══════════[w2] ─> Points one way
║ ║
<v2>══<v3> <v4>══<v5>
│ │ │ │
│ v │ │
│ (b3)<─────┘ │
v │
(b2)<─────────────────┘ "tiled windowing"
The screen is showing view2 of buffer2 in window1 and view4 of buffer3
in window2. A window group contains a ring of one or more windows.
Each window contains a ring of one or more views. Each view points to
a buffer. NEXT_GROUP and PREV_GROUP move around the window group ring.
NEXT_WINDOW and PREV_WINDOW move around the active window ring.
NEXT_VIEW and PREV_VIEW move around the active view ring. The built-in
function LOAD_FILES handles all inserting of views, windows, and
buffers. QUIT_VIEW deletes the active view of the active buffer.
Below is a description of the contents of each structure. A dot
indicates the field can be accessed as an internal variable.
A group contains the following fields:
window_p pointer to active window
next_group_p pointer to next group (NEXT_GROUP)
prev_group_p pointer to previous group (PREV_GROUP)
A window contains the following fields:
.window_x,.window_y Top left coordinates of window
.window_height,.window_width Height and width of window
.buf_name_color For a complete list of window
.mono_buf_name_color color fields see
... "internal-variables"
.cursor_color
.mono_cursor_color
.window_style Determines window border
style and corner characters
to be used. There is further
explanation below.
.window_overlap Indicates whether this window
overlaps any other window
.window_x The top left x position of
window (0..screen_width()-2)
.window_y The top left y position of
window (0..screen_height()-3)
.window_height Window height
(1..screen_height()-2)
.window_width Window width
(2..screen_width())
.subtitle Window subtitle
.group_id Group the window belongs to
view_p Pointer to active view
next_window_p Pointer to next window (NEXT_WINDOW)
prev_window_p Pointer to previous window(PREV_WINDOW)
A view contains the following fields:
block,line within block Accessible via POINT and GOTO_POINT.
.line Line number of current line.
.col Column position within
current line. 1..255
.left_edge Column scroll position
0..255-1
.cursor_x Text cursor x position
0.. .window_width-1
.cursor_y Text cursor y position
0.. .window_height-1
.window_id Window id
.buf_id buffer id
next_view_p Pointer to next view (NEXT_VIEW)
prev_view_p Pointer to previous view (PREV_VIEW)
A buffer contains the following fields:
.buf_name Name of buffer
.Noflines Number of lines in file
.modify Non zero indicates buffer
has been modified
.margins String containing left,right
and new paragraph margins.
1..254
.tabs String containing up to 30
tab stops.
.Nofviews Number of views of the buffer
.mode_name Name of current mode
buffer variables Contents of variables defined by
the BUFFER primitive.
Some fields that don't help explain the windows structure have been
left out.
(command,cursor): WORD-CHARS [characters]
Allows you to specify the characters in a word. These characters
affect word commands such as BOTH-NEXT-WORD or BOTH-PREV-WORD and the
characters used for word searching.
(command,misc): WORD-WRAP [Y|N]
If yes, the editor attempts to keep the cursor within the margins when
entering text, moving the cursor, and deleting characters. The
WORD-WRAP command only affects the current buffer. To set the default
word-wrap style for specific file extensions, invoke the CONFIG menu
(F5) and select "File extension setup...".
See also FORMAT-SPACES
(built-in,file): WRITE_FILE [command_line]
Writes current buffer to file name specified. If no name is specified,
the buffer name is used.
command_line may contain an output filename and any of the
following switches:
+ or -E Turn on/off expand tabs to spaces switch. Default
is off.
+ or -S Strip trailing spaces on each line. Default is on.
+ or -B Binary switch. Default is off. Save file without
carriage return, line feeds, or end of file
marker.
+ or -O Overwrite destination switch (no backup).
Default is off. Useful for writing a file
to a device such as the printer.
+ or -T Compress saved file with tab increments of 8
switch. Default is off.
+ or -Z Add end of file marker Ctrl-Z switch. Default is
off.
+ or -A Convert dest filename to absolute. Default is
on. This option is currently used to write files
to device names such as PRN. For example,
"write_file +o -a +e prn" sends the current buffer
to the printer.
+D,-D,+DK,-DK These options specify the backup style. The
default backup style is +D. The backup styles
are:
+D Write backup files to a backup directory. The
default backup directory is "\slick\backup\". You
may define an alterate backup directory by
defining an environment variable call
SLICKBACKUP. The SLICKBACKUP environment variable
must not contain a drive specifier and must end
with a '\' character. The backup file gets the
same name part as the destination file. For
example, given the destination file
"c:\project\test.c", the backup file will
be "c:\slick\backup\test.c". This option
is NOT recommended if you are running SLICK on
a NETWORK.
-D Write backup files to a directory derived from
concatenating a backup directory with
the path and name of the destination file. The
default backup directory is "\slick\backup\". You
may define an alterate backup directory by
defining an environment variable call
SLICKBACKUP. The SLICKBACKUP environment variable
must not contain a drive specifier and must end
with a '\' character. For example, given the
destination file "c:\project\test.C", the backup
file will be "c:\slick\backup\project\test.c".
For a network, you may need to create the directory
with appropriate access rights manually before
saving a file.
+DK,-DK Write backup files to a backup directory off
the same directory as the destination file.
+DK or -DK specifies this style. For example, given
the destination file "c:\project\test.c", the backup
file will be "c:\project\backup\test.c". Unlike the
other backup options, SLICK should have no problems
creating the BACKUP directory with the correct access
rights for a network.
The internal variable .modify is turned off if the output filename is
the same as the current file name.
Example
/* Save the current file. */
write_file
/* Write current file to printer. */
write_file '+o -a +e prn'
(command,file): WRITE-LIST [filename]
Writes the selected files to filename. If filename is not specified
you are prompted for a filename. The WRITE-LIST command may be used to
create a list of filenames for the MAKE-TAGS command. The SAVE command
is the fastest way to save a file manager list. However, its format is
not accepted by the MAKE-TAGS command and may not be accepted by other
programs. Used in fileman mode.
See also READ-LIST
(command,misc): WRITE-STATE filename
Saves macro module(s), name table, key table(s), global/universal
variable value(s), and editor options to filename. Upon return RC is
set to the return code. If RC is non-zero, an error message will get
displayed after the macro finished unless CLEAR_MESSAGE is called.
When the editor is invoked, it searches for the state file "slick.sta".
First the directory from which the editor was loaded is searched and
then the path directories are searched. The editor will not search for
a state file if the editor is invoked with the '-x' option in the
command line. State files (.sta) or normal pcode files (.sx) may be
specified with the -x option.
Example
write-state slick.sta
See also RC, CLEAR_MESSAGE, WRITE_STATE
(built-in,misc): WRITE_STATE filename
Saves macro module(s), name table, key table(s), global/universal
variable value(s), and editor options to filename. Upon return RC is
set to the return code. If RC is non-zero, an error message will get
displayed after the macro finished unless CLEAR_MESSAGE is called.
When the editor is invoked, it searches for the state file "slick.sta".
First the directory from which the editor was loaded is searched and
then the PATH directories are searched. The editor will not search for
a state file if the editor is invoked with the '-x' option in the
command line. State files (.sta) or normal pcode files (.sx) may be
specified with the -x option.
Example
write_state 'rich.sta'
/* now the editor may be invoked with "s -xrich.sta". */
See also RC, CLEAR_MESSAGE
(built-in,display): WRITE_XY string,x,y [,color]
Writes string in color to screen position specified. Shell window is
not opened. x range is 0..SCREEN_WIDTH()-1. y range is
0..SCREEN_WIDTH()-1. Color constants are listed in the file
"colors.sh".
(built-in,misc): XCOM [command]
Executes the external command or program specified by-passing an
internal command search for the command. XCOM is an internal command.
Example
defc color (COLOR_FIELD_ARG)
/* if xcom did not prefix this command, this would cause */
/* infinite recursion */
'xcom color 'arg(1)
(command,misc): XDOS [-e] [command]
For DOS, the command XDOS allows you to allocate all but approximately
10k of memory to any external program. Before the command is executed,
the editor swaps almost all of itself to disk or EMS memory to run the
command specified. SLICK will automatically use EMS memory if you have
an EMS driver installed. If you want SLICK to used extended memory,
invoke SLICK with the -Y option (See help on INVOCATION). If you do
not specify a command parameter to the XDOS command, SLICK will save
the window configuration, buffer positions, the command retrieve
buffer, and exit. Later you can return to the same directory and
resume editing the same files by invoking SLICK with the "-r restore"
parameters. Two files are created in the current directory called
"$window.slk" and "$command.slk" which contain the window
configuration, buffer positions, and command retrieve buffer. Specify
the -e parameter if you want the standard output of the command to be
processed as error messages. See help on NEXT-ERROR command for format
of error messages recognized.
See also DOS, AUTO-RESTORE
(command,misc): XNEXT-ERROR
Reads the "$errors.tmp" file and finds next error. Cursor is placed on
the line and column of the file with error. This command is not useful
for OS/2 and is normally invoked by the DOS batch program "slk.bat".
See help on the NEXT-ERROR command for a description of the error
message format.
See also COMPILE, NEXT-ERROR, MAKE-PROJECT