Previous Next Chapter

f

Français

gb

British

i

Italiana

n

Norsk

po

Português

s

Svenskt

usa

American

usa2

Dvorak

To specify the same permanent keymap, use the Preferences Input editor to save your choice.

Example:

Ro change to a French Canadian keymap, enter:

1> SETKEYBOARD cdn

The keymap file must be in the KEYMAPS: directory for SETKEYBOARD to find it.

SKIP

Skips to a label when executing script files.

Format

SKIP [<label>] [BACK]

Template

LABEL,BACK/S

Location

Internal

SKIP is used in scripts to allow you to skip ahead in the script to a <label> defined by a LAB statement. If no <label> is specified, SKIP jumps to the next LAB statement.

SKIP always searches forward from the current line of the file. However, when the BACK option is used, SKIP starts searching for the label from the beginning of the file. This allows SKIPs to points prior to the SKIP command.

You can only SKIP as far back as the last EXECUTE statement. If there are no EXECUTE statements in a script, you SKIP back to the beginning of the file.

If SKIP does not find the label specified, the command sequence terminates and the message Label <label> not found by Skip is displayed.

Example:

Assume you have the following script, called CheckFile:

.KEY name
IF exists <name>
SKIP message
ELSE
ECHO "<name> is not in this directory."
QUIT
ENDIF
LAB message
ECHO "The <name> file exists."

You can run the script by entering:

1> EXECUTE CheckFile Document

If the Document file exists in the current directory, the execution of the script SKIPs ahead to the LAB command. The message:

The Document file exists.

Is displayed in the Shell window.

If the Document file is not in the current directory, the execution of the script jumps to the line after the ELSE statement, displaying the message:

Document is not in this directory.

See also: EXECUTE, LAB. For more examples using the SKIP command, see Chapter 8.

SORT

Alphabetically sorts the lines of a file.

Format

SORT [FROM] <file | pattern> [TO] <filename> [COLSTART <n>] [CASE] [NUMERIC]

Template

FROM/A,TO/A,COLSTART/K,CASE/S,NUMERIC/S

Location

C:

SORT sorts the FROM file alphabetically, line-by-line, sending the sorted results to the TO file. SORT assumes the file is a normal text file in which lines are separated by line feeds. SORT normally disregards case. If the CASE switch is given, upper-cased items are output first.

The COLSTART keyword specifies the character column at which the comparison begins. SORT starts comparing the lines from that point, wrapping around to the beginning of the line if the compared lines match to the end.

When the NUMERIC option is specified, the lines are interpreted as numbers from the first column reading to the right, stopping at the first non-numeric character. Lines not beginning with numbers are treated as 0. The lines are output in numerical order. CASE is ignored when NUMERIC is specified.

Example:

1> SORT DF0:Glossary TO DF0:Glossary.alpha

sorts the lines in the Glossary file, arranges them alphabetically, and outputs them to a next file called Glossary.alpha. The case of the words is disregarded.

For more examples using the SORT command, see Chapter 8.

STACK

Displays or sets the stack size within the current Shell.

Format

STACK [[SIZE] <stack size>]

Template

SIZE/N

Location

Internal

A Shell uses a certain amount of stack, a special area in memory allocated for it. Each Shell has a specific stack size. If a program causes a system failure, changing the Shell's stack size may solve the problem. Commands performing operations consisting of multiple levels can require additional stack space.

Stack sizes typically range from 4096 to 40000 bytes. If the stack size is too small, a system failure can occur. If the stack size is too large, it can use too much memory.

Note:

A software failure message is displayed if you run out of stack space. Increase the stack space for the Shell that caused the error.

Entering the STACK command with no arguments displays the current stack size.

STATUS

Lists information about Shell processes.

Format

STATUS [<process>] [FULL] [TCB] [CLI | ALL] [COM | COMMAND <command>]

Template

PROCESS/N,FULL/S,TCB/S,CLI=ALL/S,COM=COMMAND/K

Location

C:

STATUS without any arguments lists the numbers of the current Shell processes and the program or command running in each. The <process> argument specifies a process number, limiting STATUS to giving information about that process only.

For information on the stack size, global vector size, priority, and the current command for each process, use the FULL keyword. The TCB keyword is similar, omitting the command information. The CLI=ALL keyword gives only the command information.

STATUS searches for a command when you use the COMMAND option. STATUS scans the Shell list, looking for the specified <command>. If the command is found, the Shell's process number is output, and the condition flag is set to 0. Otherwise, the flag is set to 5 (WARN).

Example 1:

1> STATUS 1
Process 1: Loaded as command: status

Example 2:

1> STATUS 1 FULL
Process 1: stk 4000, gv 150, pri 0 Loaded as command: status

Example 3:

1> STATUS >RAM:Xyz COMMAND=COPY
1> BREAK <RAM:Xyz >NIL: ?

sends a break to the process executing COPY.

TYPE

Displays the contents of a file.

Format

TYPE {<file | pattern>} [TO <name>] [OPT H | N] [HEX | NUMBER]

Template

FROM/A/M,TO/K,OPT/K,HEX/S,NUMBER/S

Top Previous Next Chapter