All these commands have to be prefixed with a backslash (\). This prefix character can be changed with the \prefix command.
This is how a command is presented in this manual.
Aliases are case insensitive and are always stored in uppercase.
Lines starting with ! are treated as comments.
Aliases | |
---|---|
\alias | define or list aliases |
\dir | directory listing |
\evaluate | calculator |
\export | put alias to environment |
\import | import alias from environment |
\repeat | multiple execution |
\shell | create new shell |
\store | save result from evaluate |
\unalias | remove alias |
Directories | |
\back | return to previous directory |
\cd | change working directory |
\dir | directory listing |
\mkdir | create directory |
Files | |
@ | execute commandfile |
& | execute commandfile |
\command | show command list |
\dir | directory listing |
\edit | invoke editor |
\journal | copy input commands to file |
\rename | rename file |
Flow Control | |
\exit | emulate end-of-file |
\goto | skip statements |
\if | conditional execution |
\repeat | multiple execution |
Keyboard | |
@ | execute commandfile |
& | execute commandfile |
\bell | keyboard bell |
\help | try to display program help |
\journal | write input commands to file |
\pause | pause until user types go |
Process | |
\spawn | execute command as subshell |
\shell | create new shell |
Screen | |
\cls | clear screen |
\echo | echo input commands and command files |
\output | more or less output |
\wl | set terminal width to 132 |
\wn | set terminal width to 80 |
Timing | |
\cpu | show cpu time since last setcpu |
\date | show date |
\pause | wait for user (if interactive) |
\second | show cpu time since last setcpu |
\setcpu | initialize cpu timer |
\time | show time |
\wait | wait |
!check for 2 input parameters \if not alias $1' \exit \if not alias $2' \exit !now show the values of the parameters \alias $1 \alias $2 |
\alias | list all aliases |
\alias a | list specific alias a |
\alias a line | set alias a to line |
\echo on | echo all input commands |
\echo off | do not echo input commands |
\echo auto | echo input commands only from @files |
\echo debug | echo all input commands. Echo cannot be switched off anymore |
Expressions | |
---|---|
+ | add |
- | subtract |
* | multiply |
/ | divide |
** | power |
^ | power |
Functions (radians) | |
tan | tangent |
sin | sine |
cos | cosine |
atan | arc tangent |
asin | arc sine |
acos | arc cosine |
Functions (degrees) | |
tand | tangent |
sind | sine |
cosd | cosine |
atand | arc tangent |
asind | arc sine |
acosd | arc cosine |
Other Functions | |
sqrt | square root |
exp | exponent |
log | natural log |
log10 | base 10 log |
int | truncate |
nint | round |
Constants | |
Pi | 3.1415.... |
PiOver2 | 0.5*Pi |
TwoPi | 2*Pi |
Grad | 180.0/Pi |
If the URL is not found, a search is done for a (VMS-like) .hlp file. The search order is:
OutputLevel | Command | Action |
---|---|---|
full | @ | echo script name |
\command | list obsolete commands | |
\alias | echo alias definition | |
\repeat | echo repeat nr and command | |
\unalias | echo removal of alias | |
debug | a lot during file search | |
echo input and substituted lines |
Before | With Alias | Without Alias |
---|---|---|
abcd | [abcd] | abcd |
ab'cd | ab[cd] | abcd |
'abcd | [abcd] | abcd |
ab''cd | ab'cd | |
''abcd | 'abcd | |
ab'c'd | ab[c]d | abcd |
'ab'cd | [ab]cd | abcd |
abcd' | abcd |
alias | value |
---|---|
CONFIG_PATH | path where image configuration files reside |
IMAGE_NAME | name of current image |
USER_NAME | user invoking the program |
WORK_DIR | directory where program was started from |
NODE_NAME | host name |
PROCESS_MODE | Batch, Interactive..... |
PROCESS_NAME | process name or process id |
At program startup 3 init files (if they exist) will be executed if the following order:
#make an alias script1 which executes a file \alias script1 @'config_path'script1 #if script2 exists, make an alias script2 \if file 'config_path'script2 \alias script2 @'config_path'script2 #so script2 will be an unknown command if the file does not exist #another approach: \alias script2 &'config_path'script2 #so script2 will be defined, but does nothing if the file does not exist. \alias x 600 \alias y 400 \alias w 1000 \alias h 800 \alias zoom2 zoomfactor 2 zoom 'hx'-'w'/4 'hy'-'h'/4 'hx'+'w'/4 'hy'+'h'/4 \alias zoom3 zoomfactor 3 zoom 'hx'-'w'/6 'hy'-'h'/6 'hx'+'w'/6 'hy'+'h'/6 \alias zoom4 zoomfactor 4 zoom 'hx'-'w'/8 'hy'-'h'/8 'hx'+'w'/8 'hy'+'h'/8 \alias zoom5 zoomfactor 5 zoom 'hx'-'w'/10 'hy'-'h'/10 'hx'+'w'/10 'hy'+'h'/10 \unalias w \unalias h \unalias x \unalias y #go5 will run go 5 times \alias go5 \repeat 5 go |