b740c58bf3476bf6bba92359dae0a8f0c85efbe4
kent
  Tue Aug 13 11:53:16 2019 -0700
Adding doc on 'and' and 'or' operations.  Adding details of what happens when you add mixed string to numbers.

diff --git src/lib/strex.doc src/lib/strex.doc
index 542ab3b..ec07ed4 100644
--- src/lib/strex.doc
+++ src/lib/strex.doc
@@ -1,19 +1,43 @@
 The strex language is a small string expression evaluation language.  
 This document describes its built in functions and operators:
 
-+  - returns the concatenation of the surrounding strings.  Will convert a number to a string
++  - returns the concatenation of the surrounding strings or the addition of surrounding
+     numbers.  Will convert a number to a string in mixed expressions
+
+or  - logical or operation extended to strings and numbers.  
+     for logic - if any or-separated-values are true, return true, else false
+     for numbers - if any or-separated non-zero numbers exist, return first one else 0
+     for strings - if any or-separated non-empty strings exists, return first one else ""
+   In mixed operations result is converted to strings if strings are involved or
+   the values "" and "true" if no strings are involved.  
+   For the pure string case this can be useful for setting defaults as well.  For
+   instance presuming you might or might not have filled in values for the city or country
+   variables in the given expression that would return a location of some sort
+	   city or country or "somewhere in the universe"
+     
+
+and - logical and operation extended to strings and numbers
+     for logic - if all and-separated-values are tru, return true, else false
+     for numbers - if all numbers are non-zero return true else false
+     for strings - if all and-separated strings are nonempty, return true, else ""
+   In mixed operations result is converted to strings if strings are involved or
+   the values "" and "true" if no strings are involved.
+
+returns first nonempty string or non-zero number on either side of | or "" if all empty
+&  - returns first empty string or zero on either side of & or right side if all non-empty
+
 
 [index] - selects a character from string given an integer zero based index. As in Python
        if index is negative it selects characters from the end of the string.  -1
        corresponds to the last character of string, as 0 corresponds to first.
        Returns empty string if index out of range.
       
 between(prefix, string, suffix) - returns the part of string found between prefix and suffix
    example:   between("abc", "01234abcHelloxyz56789", "xyz")  fetches just "Hello"
    If there are multiple places the prefix occurs, it will choose the first one, and the
    then the first place the suffix matches after that.  The biologist might think of it as
    a text oriented PCR, though the primer prefix and suffixes are not included in the output.
    The prefix "" corresponds to beginning of string and the suffix "" corresponds to end.
    Returns empty string if nothing found.
 
 split(string, index)  - white space separated word from string of given 0 based index.