|
GEOS SDK TechDocs
|
|
addr-parse ...
|
assign ...
alias
alias [<name> [<body>]]
Examples:
-
"alias p print"
-
Execute "print" when the user types the command "p". Any arguments to "p" get passed to "print" in the order they were given.
-
"alias while {for {} $1 {} $2}"
-
Executes an appropriate "for" loop when the "while" command is executed with its two arguments: a test expression and a body of commands to execute.
-
"alias"
- Prints all the defined aliases.
-
"alias while"
-
Prints what the "while" command is aliased to.
This is a short-cut to allow you to make commands you commonly type easier to use, and to define simple new commands quickly.
-
If you give no arguments the current aliases are all displayed.
-
If you give a single argument, the name of an existing alias, the command that will be executed when you use the alias is printed.
-
The <body> string is usually in curly braces, as it usually involves whitespace and can contain newlines for the longer aliases.
-
You can use the pseudo-variables $1, $2, etc. in the <body> to represent the 1st, 2nd, etc. argument given when the alias is invoked. They are pseudo-variables as the "var" command will not operate on them, nor are they available to any procedure invoked by the alias.
-
You can also interpolate a range of the arguments using $<start>-<end>. If you do not give an <end>, then the arguments from <start> to the last one will be interpolated.
-
$* will interpolate all the arguments.
-
$# will interpolate the actual number of arguments.
-
If you do not use any of these pseudo-variables, all the arguments given to the alias will be appended to the <body>.
-
Interpolation of the values for these pseudo-variables occurs regardless of braces in the <body>.
-
It is an error to specify an argument number when there are fewer than that many arguments given to the alias.
See Also: unalias.
alignFields
var alignFields [(0|1)]
Examples:
-
"var alignFields 1"
-
Sets the "print" command to align the values for all the fields of a given structure.
Determines whether structure-field values follow immediately after the field name or if all values are indented to the same level. The "print" command and other display commands use this variable when formatting their output.
-
Having all values indented to the same level makes it easier for some people to locate a particular field in a structure. It is not without cost, however, in that Swat must determine the length of the longest field name before it can print anything.
-
The default value for this variable is zero.
See Also: print.
antifreeze
antifreeze <patient>
antifreeze :<n>
antifreeze <patient>:<n>
antifreeze <id>
Examples:
-
"antifreeze term"
-
Promotes the application thread for "term" to be the "most-runnable"
-
"antifreeze :1"
-
Does likewise for thread #1 of the current patient
-
"antifreeze 16c0h"
-
Does likewise the thread whose handle is 16c0h
-
"antifreeze"
- Promotes the current thread to be the "most-runnable."
See Also: freeze.
antithaw
antithaw <patient>
antithaw :<n>
antithaw <patient>:<n>
antithaw <id>
Examples:
-
"antithaw term"
-
Allows the application thread for "term" to run normally.
-
"antithaw :1"
-
Allows thread #1 of the current patient to run normally.
-
"antithaw 16c0h"
-
Allow the thread whose handle is 16c0h to run normally.
See Also: thaw.
appobj
appobj [<patient>]
Examples:
-
"pobj [appobj draw]"
-
prints the GenApplication object for draw.
-
"pobj [appobj]"
-
prints the GenApplication object for the current application (equivalent to "pobj -a").
Returns the address of the GenApplication object for the given patient, or the current one if you give no patient.
See Also: impliedgrab.
apropos
apropos [<string>]
Examples:
-
"apropos vis"
-
Find all commands related to vis
-
"apropos text"
-
Find all commands related to text
Search the list of commands and command help for all entries containing <string>. Lists each command and its synopsis.
<string> may actually be a pattern, as described in the help for the "string" command (under "string match"). It automatically has a leading and following * tacked onto it to cause it to match anywhere within a help string.
See Also: help.
aset
aset <array-name> <index> <value>
Examples:
-
"aset foo $i $n"
-
Sets the $i'th element (counting from zero) of the value stored in the variable foo to $n.
Allows you to treat a list stored in a variable as an array, setting arbitrary elements of that array to arbitrary values.
-
<array-name> is the name of the variable, not the value of the variable to be altered.
-
This command returns nothing.
-
The index must be within the bounds of the current value for the variable. If it is out of bounds, aset will generate an error.
See Also: index.
assoc
assoc <list> <key>
Examples:
-
"assoc $classes GenPrimaryClass"
-
Examines the sublists of $classes and returns the first one whose first element is the string GenPrimaryClass.
Searches an associative list to find an element with a particular key. The list is itself made up of lists, each of whose first element is a key.
-
A typical associative list is made of key/value pairs, like this:
{{<key> <value>} {<key> <value>} ...}
-
If an element is found whose <key> matches the passed <key>, the entire element is returned as the result. If no <key> matches, nil is returned.
See Also: car,
cdr,
range,
list,
delassoc.
|
GEOS SDK TechDocs
|
|
addr-parse ...
|
assign ...