Index: /trunk/Ohana/doc/www/html/IPP-subsystems/pclient/index.htm
===================================================================
--- /trunk/Ohana/doc/www/html/IPP-subsystems/pclient/index.htm	(revision 4733)
+++ /trunk/Ohana/doc/www/html/IPP-subsystems/pclient/index.htm	(revision 4734)
@@ -3,5 +3,5 @@
 <meta name=page  content=pclient summary>
 
-#pclient/# is the remote process monitor for pcontrol, the parallel
+<tt>pclient</tt> is the remote process monitor for pcontrol, the parallel
 process controller.
 
@@ -9,6 +9,6 @@
 
 <p>
-The program #pclient/# is used to support the remote jobs which are
-run on the remote hosts by #pcontrol/#.  The concept of pclient is to
+The program <tt>pclient</tt> is used to support the remote jobs which are
+run on the remote hosts by <tt>pcontrol</tt>.  The concept of pclient is to
 act as a buffer between the job running on the remote host and
 pcontrol.  The pcontrol design uses (by default) ssh connections
Index: /trunk/Ohana/doc/www/html/Opihi-Programs/index.htm
===================================================================
--- /trunk/Ohana/doc/www/html/Opihi-Programs/index.htm	(revision 4733)
+++ /trunk/Ohana/doc/www/html/Opihi-Programs/index.htm	(revision 4734)
@@ -13,14 +13,14 @@
 arithmetic on variables, input from source files, and a variety of
 other useful tools.  Opihi has a simple command-line interaction that
-resembles the UNIX tcsh, but with many additional useful features.  It
-can also be used as a scripting language much like #sh/# or perl.
+resembles the UNIX <tt>tcsh</tt>, but with many additional useful
+features.  It can also be used as a scripting language much like
+<tt>sh</tt> or perl.
 
 <p>
 Opihi includes tools to manipulate and display 1-D (vector) and 2-D
-(matrix) data.  Two external programs are used to graphical display.
-These are the image display tool (Kii), the graphing tool (Kapa), and
-the vector and matrix manipulation commands.  Various functions are
-available to perform math, statistical, and other operations on
-vectors and images.
+(image) data.  Two external programs are used for graphical display:
+the image display tool (Kii) and the graphing tool (Kapa).  Various
+functions are available to perform math, statistical, and other
+operations on vectors and images.
 
 <h3> User Interface </h3>
@@ -28,26 +28,18 @@
 <p>
 The command-line interaction is based on the readline libraries and
-behaves like tcsh.  Arrows can be used for editing.  There is both
-command and file completion with the TAB key.  Multiple commands can
-generally be placed on one line with semi-colons as separators.  
-
-The interface has an interaction similar to <tt>tcsh</tt>.  The arrows
-allow editing of previous commands.  You can also use emacs-like
-commands such as cntl-a to reach the beginning of the line and cntl-e
-to reach the end.  There is command and file completion: if you type
-part of a command (as the first thing on a line) and then type tab, it
-will fill in as much as possible, until the word is not unique.
-Typing tab twice at that point will list the possible endings.  For
-any but the first word on a line, the same thing will happen for the
-files in the current directory.  It is also possible to type just a
+behaves like #tcsh/#.  Arrows can be used for editing.  There is both
+command and file completion with the TAB key.  You can also use
+emacs-like commands such as ctrl-a to reach the beginning of the line
+and ctrl-e to reach the end.  It is also possible to type just a
 fraction of a command, as long as it is unique.  An ambiguous command
 will list the possible alternatives.  For example:
 
 <pre>
-dvo: c
+opihi: c
 ambiguous command: c ( catalog cgrid clear create cursor )
 </pre>
 
-The shell is an interpretive programming language.
+Multiple commands can generally be placed on one line with semi-colons
+as separators.
 
 <h3> Data Representations</h3>
@@ -56,7 +48,7 @@
 
 <p>
-Scalar variables in Opihi are proceeded with a dollar sign ($).  A
+Scalar variables in Opihi are prepended with a dollar sign ($).  A
 variable may be created and the value assigned by a line which looks
-like: 
+like:
 
 <p class=eq>
@@ -67,18 +59,21 @@
 consist of the standard math operators (+,-,*,/) as well as any
 already-defined variables and the functions log(), ln(), sqrt(),
-exp(), ten() ($10^x$), sin(), cos(), etc.  Variables can be numeric or character strings.  If
-the shell does not understand the syntax of the line as a math
-expression, it is assumed to be a string.
+exp(), ten() ($10^x$), sin(), cos(), etc.  Other special operators are
+the carret (^) for exponetiation (eg, 2^3 is 8) and the @ symbol as a
+binary arc-tangent (eg, 1@3 is 18.43 degrees).  In addition, the
+operator #<</# returns the minimum of the two surrounding values, and
+#>>/# returns the maximum.  Variables can be numeric or character
+strings.  If the shell does not understand the syntax of the line as a
+math expression, it is assumed to be a string.
+
+<em>local variables</em>
 
 <p>
 If there is a pair of curly brackets {} anywhere on a command line,
-whatever is inside is assumed to be a math expression and evaluated as
-well.  This later feature allows functions of variables to be passed
-as arguments to Opihi functions.  (see also the discussion below about
-temporary vectors and images).
-
-Any expression within curly brackets {} is assumed
-to be an arithmetical expression and is evaluated before the line is
-executed.  For example:
+whatever is inside is assumed to be a math expression and evaluated
+before the line is executed.  This later feature allows functions of
+variables to be passed as arguments to Opihi functions.  (see also the
+discussion below about temporary vectors and images).
+For example:
 
 <pre>
@@ -86,10 +81,10 @@
 </pre>
 
-would give the response 7.07107.  There are math functions cos, sin,
-and tan, which operate on radian expressions, and also dcos, dsin,
-dtan, which operate on degree expressions.  There are also the
-equivalent inverse functions: eg., asin and dasin return radians and
-degrees, respectively.  The help section on Math defines all of the
-available math functions.  
+would give the response 7.07107 if $fred had the value of 10.0.  There
+are math functions #cos/#, #sin/#, and #tan/#, which operate on radian
+expressions, and also #dcos/#, #dsin/#, #dtan/#, which operate on
+degree expressions.  There are also the equivalent inverse functions:
+eg., #asin/# and #dasin/# return radians and degrees, respectively.
+The help section on Math defines all of the available math functions.
 
 <h4> Lists </h4>
@@ -97,10 +92,10 @@
 Opihi lists are grouped sets of scalar variables (which may be
 strings).  A list consists of N variables with names of the form
-<tt>name:i/#, where the value of i ranges from 0 to N-1.  In addition,
-the list length is defined as the value #name:n/#.  Since these are
+<tt>name:i</tt>, where the value of i ranges from 0 to N-1.  In addition,
+the list length is defined as the value <tt>name:n</tt>.  Since these are
 just informally grouped, a list may be defined by hand (ie, by
 defining each element and the length).  There is also the command
-#list/# which builds a list from the following lines until reaching
-a line consisting of the single word #end/#:
+<tt>list</tt> which builds a list from the following lines until reaching
+a line consisting of the single word <tt>end</tt>:
 
 <pre>
@@ -112,5 +107,5 @@
 </pre>
 
-will define the variables #$sample:0 - $sample:2/#, and #$sample:n/#,
+will define the variables <tt>$sample:0 - $sample:2</tt>, and <tt>$sample:n</tt>,
 with value of 3.
 
@@ -138,23 +133,23 @@
 A queue is a data construct consisting of a sequence of lines from
 which simple selections can be made.  Data items are added and removed
-from the queue with #queuepush/# and #queuepop/# commands which push
+from the queue with <tt>queuepush</tt> and <tt>queuepop</tt> commands which push
 entries on the end of the queue and pop them off the beginning.  The
-available queues may be obtained with the command #queuelist/#, and
-the length of a specific queue may be determined with the #queuesize/#
-command.  The contents of a queue may be printed with #queueprint/#.
+available queues may be obtained with the command <tt>queuelist</tt>, and
+the length of a specific queue may be determined with the <tt>queuesize</tt>
+command.  The contents of a queue may be printed with <tt>queueprint</tt>.
 Pushing data onto a non-existent queue will create the queue.  An
-empty queue may be created with the command #queueinit/# and a queue
-may be deleted with #queuedelete/#.  
-
-<p>
-The #queuepush/# commands allows for additional options which modify
-how the data is pushed on the queue.  The #-uniq/# flag specifies that
+empty queue may be created with the command <tt>queueinit</tt> and a queue
+may be deleted with <tt>queuedelete</tt>.  
+
+<p>
+The <tt>queuepush</tt> commands allows for additional options which modify
+how the data is pushed on the queue.  The <tt>-uniq</tt> flag specifies that
 the queue should be search for an existing match and not add the new
-data item if a matching item already exists.  The #-replace/# flag is
-similar to the #-uniq/# flag, but instead the new item will replace
+data item if a matching item already exists.  The <tt>-replace</tt> flag is
+similar to the <tt>-uniq</tt> flag, but instead the new item will replace
 the existing match, if a match is found.  These two options have
 identical results if the match is made based on the entire line.
 However, they may be more usefully distinguished by specifying a
-restriction on the match with the #-key/# flag.  This flag specified
+restriction on the match with the <tt>-key</tt> flag.  This flag specified
 which whitespace-separated element of the line to use for the match,
 with the first element being element 0.  
@@ -164,110 +159,33 @@
 document.
 
-<h3> Flow-control block </h3>
-<h3> Shell Programing </h3>
-
-<pre>
-break                     -- escape from function 
-for                       -- loops 
-if                        -- logical cases 
+<h3> Opihi Shell Programing and Flow-control</h3>
+
+<pre>
 input                     -- read command lines from a file 
 macro                     -- deal with the macros 
-</pre>
-
-<p>
-There are several options for programming in <tt>status</tt>.  First,
+for                       -- for loop 
+if                        -- logical cases 
+while                     -- while loop
+break                     -- escape from function 
+continue                  -- next loop iteration
+</pre>
+
+<p>
+There are several options for programming in the opihi shell.  First,
 a file which contains a series of commands can be executed with
-<tt>input (filename)</tt>.  It is also possible to define macros which
-will behave much like regular commands.  A macro is defined by typing
-<tt>macro name</tt> or <tt>macro create name</tt> followed by the
-commands.  Arguments to the macro are assigned to the variables $1
-.. $N and the number of arguments is given by $0.  Macros may be
-defined in <tt>input</tt> files, and in fact when <tt>status</tt> is
-started, it loads the file <tt>~/.statusrc</tt> which may contain
-default macros.  Simple loops and if statements can be performed, and
-are quite useful for complex macros.
-
-<p>
-'If' statements are similar in syntax to C if statements.  Math
-expresions in the if statement must be contained in curly braces, as
-elsewhere.  Variables with string values may use the logical ==
-operator to test if two strings are the same.  'For' loops are quite
-simplistic.  The form is:
-
-<pre>
-for var first last delta
- (commands)
-end
-</pre>
-
-<p>
-The value of <tt>$var</tt> will start at the value <tt>first</tt> and increment by
-<tt>delta</tt> after each loop.  The loop will stop after <tt>$var</tt> is greater
-than <tt>stop</tt>.  The value <tt>delta</tt> is optional, with 1 assumed.
-The value of <tt>$var</tt> may be changed during the loop, and if set
-beyong the value of <tt>last</tt> will end the loop early.  
-
-
-<p>
-Opihi has several types of flow-control features.  These include
-for-loops, while-loops, if-else blocks.  These blocks are defined by
-the corresponding command (#for/#, #while/#, #if/#) and are terminated
-with by a line with the single word #end/#.  
-
-<p>
-The for loop syntax is simplistic.  The #for/# command specifies the
-loop variable, the starting value, the ending value, and optionally
-the delta for each loop.  The implicit loop test is always to check if
-the loop variable is still less than the end value (or greater than if
-the delta value is negative).  The definitions of this loop syntax and
-the value of the list length (#$list:n/#) and the vector length
-(#vector[]/#) make for natural loops over all elements of a list or
-vector.  Below are a few examples:
-
-<pre>
-for i 1 10 0.1
- echo $i
-end
-</pre>
-This runs the loop with the variable #$i/# running from 1.0, 1.1, up to 9.9
- (inclusive).
-
-<pre>
-for i 0 $list:n
- echo $list:$i
-end
-</pre>
-This would print all the elements of the list.
-
-<pre>
-for i 0 vector[]
- echo vector[$i]
-end
-</pre>
-This would print all the elements of the vector.
-
-<p>
-The if-block begins with a line of the form: #if (condition)/# and
-ends with a single #end/#.  A line with a single #else/# specifies the
-optional else portion of the block.  The conditional expression is a
-valid math inequality with approximately C-syntax: 
-
-##
-(($i < 10) && ($i > 4))
-/##
-
-The elements of the inequality may also be string comparisons.  The
-only valid string comparisons are #==/# and #!=/#.  
-
-<p>
-The while loop begins with a line of the form #while (condition)/# and
-ends with a single #end/#.  The conditions follow the same rules as
-the if conditional statements.
-
-<p>
-*continue, break, auto-break concepts/*
-
-
-
+<tt>input (filename)</tt>.  When an opihi-based program is started, it
+loads a file from the user's home directory, with a name of the form
+<tt>~/.programrc</tt>.  This resource file may contain any commands,
+and allows a user to customize his or her environment.
+
+<p>
+It is also possible to define macros which will behave much like
+regular commands.  A macro is defined by typing <tt>macro name</tt> or
+<tt>macro create name</tt> followed by the commands.  Arguments to the
+macro are assigned to the variables $1 .. $N and the number of
+arguments is given by $0.  Macros may be defined in <tt>input</tt>
+files.  The following is a sample macro:
+
+<pre>
 macro test
  echo "this is a macro"
@@ -281,7 +199,61 @@
 
 <p>
-Some of the other useful programming features are the ability to
-run files as scripts (<tt>input (filename)</tt>) and the option of
-performing unix system calls (<tt>exec (command)</tt>).  
+Opihi has several types of flow-control features.  These include
+for-loops, while-loops, if-else blocks.  These blocks are defined by
+the corresponding command (<tt>for</tt>, <tt>while</tt>, <tt>if</tt>) and are terminated
+with by a line with the single word <tt>end</tt>.  
+
+<p>
+The for-loop syntax is simplistic.  The <tt>for</tt> command specifies
+the loop variable, the starting value, the ending value, and
+optionally the delta for each loop.  The implicit loop test is always
+to check if the loop variable is still less than the end value (or
+greater than if the delta value is negative).  The definitions of this
+loop syntax and the value of the list length (<tt>$list:n</tt>) and
+the vector length (<tt>vector[]</tt>) make for natural loops over all
+elements of a list or vector.  Below are a few examples:
+
+<pre>
+for i 1 10 0.1
+ echo $i
+end
+</pre>
+This runs the loop with the variable <tt>$i</tt> running from 1.0, 1.1, up to 9.9
+ (inclusive).
+
+<pre>
+for i 0 $list:n
+ echo $list:$i
+end
+</pre>
+This would print all the elements of the list.
+
+<pre>
+for i 0 vector[]
+ echo vector[$i]
+end
+</pre>
+This would print all the elements of the vector.
+
+<p>
+The if-block begins with a line of the form: <tt>if (condition)</tt> and
+ends with a single <tt>end</tt>.  A line with a single <tt>else</tt> specifies the
+optional else portion of the block.  The conditional expression is a
+valid math inequality with approximately C-syntax: 
+
+<pre>
+(($i < 10) && ($i > 4))
+</pre>
+
+The elements of the inequality may also be string comparisons.  The
+only valid string comparisons are <tt>==</tt> and <tt>!=</tt>.  
+
+<p>
+The while loop begins with a line of the form <tt>while (condition)</tt> and
+ends with a single <tt>end</tt>.  The conditions follow the same rules as
+the if conditional statements.
+
+<em>continue, break, auto-break concepts</em>
+
 
 <h3> Miscellaneous Commands </h3>
@@ -307,4 +279,8 @@
 files (this includes general help not associated with a specific
 command).  
+
+<em>output</em>
+
+<em>scan</em>
 
 <h3> 1D Data and the Graphing Window </h3>
