("MSQL::DATABASE-SAVE-RECORD" (("OPT-ARGS" . "var...")("KEYWORDS" . "SQL save ")("SHORT-DESC" . "Does an INSERT and UPDATE to try to store the data into <var table> using the single key <var keyname>, with value <var key>.

NOTE: If the key field for table you are using is not configured as the <i>primary key</i>, then it is possible to create duplicate entries in the database.


   If you have a variable which does not match a field name
   in the table, that variable is silently ignored.

   If you try to save character data into a numeric field,
   the insert or update will fail, and you can check the
   error message in msql::msql-error-message[]
")("KEY-ARGS"  "table=tablename" "keyname=fieldname")("REQ-ARGS"  "db" "key" "table" "keyname")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-save-record")))("MHTML::HTTP-PREFIX" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The portion of the current URL which contains the protocol, host information, and the session ID.

<complete-example>
<get-var mhtml::http-prefix>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::http-prefix")))("DBM::WITH-OPEN-DATABASE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Create an environment in which other database commands can be given.  First, the database referenced by <var dbname> is locked and opened in the mode specified by <var open-mode>, and the resultant database handle is bound to the variable named by <var dbvar>.  Then, the <var body> code is executed.  Finally, the database is closed, and further references to <var dbvar> are meaningless.

Please note that the file name specified by <var dbname> should be a full pathname; it is not relative to Web space in any way.

Only the DBM commands are meaningful within this environment.  This function is designed to allow access to legacy dbm, gdbm, or ndbm databases; it won't work on anything else.

<var open-mode> should evaluate to one of the following:

<ul>
  <li> <var reader><br>
The caller wishes only to have read access to the specified database.

<li> <var writer><br>
The caller wishes to have both read and write access to the specified database.

<li> <var write-create><br>
The caller wishes both read and write access to the specified database.  If the database does not exist, it is created.
</ul>
")("KEY-ARGS" . "mode=open-mode")("REQ-ARGS"  "dbvar" "dbname")("SECTION" . "direct-dbm-access")("FUNTYPE" . "complex")("NAME" . "dbm::with-open-database")))("WHILE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "<var test> is evaluated.  If the result is a non-empty string, then the <var body> statements are evaluated, and the process is repeated.
")("KEY-ARGS" . "")("REQ-ARGS" . "test")("SECTION" . "flow-control")("FUNTYPE" . "complex")("NAME" . "while")))("MHTML::ERROR-LOG" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "MHTML::ERROR-LOG is the full path to a file to which the server logs errors.

<complete-example>
    <get-var mhtml::error-log>
</complete-example>

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::error-log")))("ODBC::DATABASE-LOAD-RECORD" (("OPT-ARGS" . "package=packagename")("KEYWORDS" . "")("SHORT-DESC" . "Load variable values from the database referenced by <var dbvar> and <var key> into the package specified by <var packagename> (defaulting to the current package if not supplied).

<var tablename> and <var fieldname> must be supplied -- they specify the table and primary key field to be operated on.
")("KEY-ARGS"  "table=tablename" "keyname=fieldname")("REQ-ARGS"  "dbvar" "key")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-load-record")))("ENV::HTTP_USER_AGENT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The name that the connecting client browser passed as the value of the <code>User-Agent</code> MIME header.

For example:

<complete-example>
   You are connected using: <get-var env::http_user_agent>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "env::http_user_agent")))("MHTML::DOCUMENT-ROOT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The complete path to the directory from which your documents are to be served.  The final slash should not be present.

<complete-example>
   <get-var mhtml::document-root>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "variables")("FUNTYPE" . "variable")("NAME" . "mhtml::document-root")))("MSQL::DATABASE-EXEC-SQL" (("OPT-ARGS" . "")("KEYWORDS" . "query sql")("SHORT-DESC" . "Executes the SQL query in QUERY-STRING The QUERY-STRING can be any  Meta-HTML expression which evaluates to a valid SQL query or command string.

Returns TRUE if there is no error executing the query. ")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "query-string")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-exec-sql")))("VAR-EXISTS" (("OPT-ARGS" . "")("KEYWORDS" . "binding; bound; checking for unbound variable")("SHORT-DESC" . "<code>var-exists</code> checks for the <i>existence</i> of
the variable named by <var varname>, and returns <code>true</code> if that variable exists.

The existence of a variable has nothing to do with its value -- a variable exists if it has been created with <funref variables set-var>, and doesn't exist after it has been unset with <funref variables unset-var>.

<example>
  <set-var foo=1 bar>
  <var-exists foo>       --> true
  <var-exists bar>       --> true
  <get-var bar>          -->
  <unset-var foo>
  <var-exists foo>       -->
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "varname")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "var-exists")))("MHTML::SID-PREFIX" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "When this variable is present, the <code>PATH</code> component of a returned <code>Set-Cookie</code> MIME header is set to its value.  Normally, the value of <varref MHTML::RELATIVE-PREFIX> is used.

If you need to use <code>MHTML::SID-PREFIX</code>, you probably have a very complex directory structure, and the need for every page access to have a cookie associated with it.  In this case, setting <code>MHTML::SID-PREFIX</code> will have the effect of flattening your directory structure in the browser's view.

Generally, correctly written <meta-html> applications do not need to use this variable, and it might be used in only the most complicated of Web sites, with multiple sessions per connectee, etc.

The explanation of HTTP Cookies is beyond the scope of this document.  Reference information on Cookies can be found through <a href=\"http://home.netscape.com/newsref/std/cookie_spec.html\"> this link.</a>

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "session-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::sid-prefix")))("DECREMENT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Subtract <var amount> (default 1) from the contents of the variable named by <var varname>.

<example>
   <set-var foo=1>
   <get-var foo> --> 1
   <decrement foo>
   <get-var foo> --> 0
</example>

Also see <funref arithmetic increment>.
")("KEY-ARGS" . "by=amount")("REQ-ARGS" . "varname")("SECTION" . "arithmetic-operators")("FUNTYPE" . "simple")("NAME" . "decrement")))("CAPITALIZE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Changes the case of each character in <var string> to uppercase or lowercase depending on the surrounding characters.

<complete-example>
<capitalize \"This is a list\">
</complete-example>

Also see <funref string-operators downcase>, and <funref string-operators upcase>.

")("KEY-ARGS" . "")("REQ-ARGS" . "string")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "capitalize")))("MHTTPD::SESSION-DATABASE-FILE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The complete path to the file in which the server or engine stores session information, keyed by session ID.

If this variable is not set, then the default value of <code>\"/tmp/sessions.db\"</code> is used.

If the server or engine cannot access this file, no session state information may be saved or retrieved.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhttpd::session-database-file")))("MHTML::CURRENT-DOC" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The name of the current document, without any path information, query strings, etc.

If the current URL is:

<example>
http://www.company.com/foo/bar/doc.mhtml?this=that
</example>

then <code>MHTML::CURRENT-DOC</code> is:

<example>
doc.mhtml
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::current-doc")))("LOAD-MODULE" (("OPT-ARGS" . "")("KEYWORDS" . "dynamic")("SHORT-DESC" . "Loads a module dynamically at runtime, adding the function definitions found therein to the global package of <Meta-HTML> functions.

<code>load-module</code> returns the string <code>\"true\"</code> if the module is loaded successfully, or places an error in <funref language-operators system-error-output> if not.

<var module-name> is searched for by looking in each directory specified in the array <varref mhtml::module-directories>, or by loading the module as if the name specified is the full pathname to that file.

Once a module is loaded, the functions within it can be invoked just as with any standard <Meta-HTML> command.

See the <code>examples.c</code> file in the <code>modules</code> directory of your distribution for more information on writing <Meta-HTML> modules.

Example:

<example>
<set-var loaded? = <load-module /www/lib/example.so>>
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "module-name")("SECTION" . "dynamic-modules")("FUNTYPE" . "simple")("NAME" . "load-module")))("STRING-EQ" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Compare <var string1> to <var string2> and return the string <code>\"true\"</code> if they are character-wise identical.  

The optional keyword argument <var caseless=true> indicates that no consideration should be given to the case of the characters during comparison.

<example>
   <string-eq \"foo\" \"FOO\">               -->
   <string-eq \"foo\" \"foo\">               -->true
   <string-eq <upcase \"foo\"> \"FOO\">      -->true
   <string-eq \"foo\" \"FOO\" caseless=true> -->true
</example>
")("KEY-ARGS" . "caseless=true")("REQ-ARGS"  "string1" "string2")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "string-eq")))("ODBC::GET-INFO" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Performs ODBC GetInfo call.  Returns the requested
data value specified by <var fInfoType>

Valid values for <var fInfoType> are:

<example>
SQL_DRIVER_NAME
SQL_ODBC_VER
SQL_CURSOR_COMMIT_BEHAVIOR
SQL_CURSOR_ROLLBACK_BEHAVIOR
SQL_DEFAULT_TXN_ISOLATION
SQL_TXN_ISOLATION_OPTION
SQL_NON_NULLABLE_COLUMNS
SQL_DRIVER_HLIB
SQL_DRIVER_ODBC_VER
SQL_QUALIFIER_LOCATION
</example>




")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "fInfoType")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::get-info")))("ODBC::DATABASE-TABLES" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Return the names of the tables in the database referenced by <var dbvar> as a newline separated list.  If <var VARNAME> is supplied, it is the name of the variable to receive the table names. This must be done with a database already open, i.e., within the scope of a <funref odbc-database-interface odbc::with-open-database>.
")("KEY-ARGS" . "result=varname")("REQ-ARGS" . "dbvar")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-tables")))("MSQL::DATABASE-EXEC-QUERY" (("OPT-ARGS" . "cursor=varname")("KEYWORDS" . "SQL query")("SHORT-DESC" . "Executes the SQL query in <var query-string> The <var query-string> can be any expression <meta-html> expression which evaluates to
a valid SQL query or command string.

Returns a cursor object, which can be passed to 
<funref msql-database-extensions msql::database-next-record>, <funref msql-database-extensions msql::number-of-rows>, and
<funref msql-database-extensions msql::set-row-position>.

If the <var cursor> keyword arg is supplied, the returned cursor value is stored in the supplied variable name. ")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "query-string")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-exec-query")))("MHTML::DEFAULT-FILENAMES" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "An array specifying the file names that should be looked up when the URL to fetch ends in a directory, instead of a document specifier.  The files are searched for in the order in which they appear in this array.

<complete-example>
<get-var mhtml::default-filenames[]>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "variables")("FUNTYPE" . "variable")("NAME" . "mhtml::default-filenames")))("DEFUN" (("OPT-ARGS" . "named-parameter...")("KEYWORDS" . "")("SHORT-DESC" . "A synonym for <funref macro-commands define-function>.
")("KEY-ARGS" . "package=packname")("REQ-ARGS" . "name")("SECTION" . "macro-commands")("FUNTYPE" . "complex")("NAME" . "defun")))("ODBC::DATABASE-NEXT-RECORD" (("OPT-ARGS"  "colnames=namelist" "prefixtablenames")("KEYWORDS" . "")("SHORT-DESC" . "Fill the variables in <var packagename> (defaulting to the current package if not supplied) with the values of the next record which last satisfied the search referenced by <var cursorvar>.

Each subsequent call gets a subsequent record from the list of results, until all of the results are exhausted.

Returns \"true\" if there are any records left in the search results, or the empty string if not.

 If <var colnames> is supplied, then the column values of this result  are bound
   sequentially to these commas-separated list of names instead of the field names in the
   result set.

<example>
<odbc::database-next-record mydb cursor package=tmp
                colnames=\"a.name, a.partnum, b.name\">
<get-var tmp::b.name>
<get-var tmp::a.name>
</example>

If <prefixtablenames> is non-null, or the database
connection option SQL-PREFIX-TABLENAMES is non-null, then for each column in the result set, use the column's table name, if it exists, as a prefix to the column name as the variable name.
")("KEY-ARGS" . "package=packagename")("REQ-ARGS" . "cursorvar")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-next-record")))("ENCRYPT" (("OPT-ARGS" . "")("KEYWORDS" . "security; encryption; decryption; password")("SHORT-DESC" . "Encrypts the contents of the variable named by <var varname> using <var password>.

The contents of <var varname> are modified -- this function has no return value.

This function only does something if Meta-HTML has been configured with the <code> --with-des</code> option, currently only available to those sites which are physically located within the United States.

Also see <funref variables decrypt>.
")("KEY-ARGS" . "")("REQ-ARGS"  "varname" "password")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "encrypt")))("DATABASE-DELETE-RECORD" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Remove the record associated with <var key> from the database referenced by <var dbvar>.  This functions returns the string <code>\"true\"</code> upon success.

<example>
<with-open-database db /tmp/file.db mode=write>
  <set-var deleted? = <database-delete-record db <get-var key>>>
</with-open-database>
</example>

")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "key")("SECTION" . "database-commands")("FUNTYPE" . "simple")("NAME" . "database-delete-record")))("UNSET-SESSION-VAR" (("OPT-ARGS"  "name" "...")("KEYWORDS" . "")("SHORT-DESC" . "Make <var NAME>s have no value in the session database record associated with the current session.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "session-operators")("FUNTYPE" . "simple")("NAME" . "unset-session-var")))("DOWNCASE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Converts all of the uppercase characters in <var string> to lowercase.

<complete-example>
<downcase \"This is Written in Meta-HTML\">
</complete-example>

Also see <funref string-operators upcase>, and <funref string-operators capitalize>.")("KEY-ARGS" . "")("REQ-ARGS" . "string")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "downcase")))("REPLACE-PAGE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Replace the entire contents of the current page with the contents of the file named by <var filename>.  You probably don't want to use this command, use <funref flow-control redirect> instead.  In that way, the URLs give a consistent view to the user.  The rules for which file is chosen are identical to those for <funref files include>.
")("KEY-ARGS" . "alt=code")("REQ-ARGS" . "filename")("SECTION" . "page-operators")("FUNTYPE" . "simple")("NAME" . "replace-page")))("UPCASE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Converts all of the lowercase characters in <var string> to uppercase.

<complete-example>
<upcase \"This is a list\">
</complete-example>

Also see <funref string-operators downcase> and <funref string-operators capitalize>.
")("KEY-ARGS" . "")("REQ-ARGS" . "string")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "upcase")))("GET-VAR-ONCE" (("OPT-ARGS" . "name...")("SHORT-DESC" . "Returns the current value of the variables named by
the <var name>s given.  The interpreter pointer is then moved to after the returned data, thus preventing further interpretation of the data.


")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "get-var-once")))("ARRAY-CONCAT" (("OPT-ARGS" . "contributor...")("KEYWORDS" . "arrays")("SHORT-DESC" . "Appends the contents of each <var contributor> array to the 
end of <var receiver>.

Both <var receiver> and each <contributor> are variable names whose values are treated as arrays.

For a single <var contributor>, <code>array-concat</code>
could have been defined as:

<example>
<defsubst array-concat>
  <foreach item %1>
     <array-append <get-var item> %0>
  </foreach>
</defsubst>
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "receiver")("SECTION" . "arrays")("FUNTYPE" . "simple")("NAME" . "array-concat")))("ARRAY-ADD-UNIQUE" (("OPT-ARGS" . "")("KEYWORDS" . "arrays")("SHORT-DESC" . "Adds <var item> as the last array element of the contents
of <var arrayvar> if, and only if, <var item> is not already
a member of that array.

The comparison is a direct string-wise compare.  If <var CASELESS> is non-empty, then a caseless string compare is done.

See also <funref arrays array-append>.
")("KEY-ARGS" . "caseless=true")("REQ-ARGS"  "item" "arrayvar")("SECTION" . "arrays")("FUNTYPE" . "simple")("NAME" . "array-add-unique")))("MHTML::CACHEABLE" (("OPT-ARGS" . "")("KEYWORDS" . "caching; timeout; ttl")("SHORT-DESC" . "The variable MHTML::CACHEABLE, when set to a non-null value, indicates to the engine or server that the expiration date of the current page should be in the future (currently, about 10 days in the future).
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::cacheable")))("MHTML::FULL-URL" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The URL used to connect to the current document, including protocol, host information, session ID, path-information, and query strings.

<complete-example>
<get-var mhtml::full-url>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::full-url")))("DELETE-SESSION" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Immediately end the current session.  This never returns anything. The current session is indicated by the value of the variable <varref SID>,  so you can delete sessions other than your own by setting that variable.  Also see <funref session-operators sessions-of-key>.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "session-operators")("FUNTYPE" . "simple")("NAME" . "delete-session")))("SET-SESSION-VAR" (("OPT-ARGS" . "name=value...")("KEYWORDS" . "")("SHORT-DESC" . "Give the <var NAME>s the associated <var VALUE>s in
the session database record associated with the current session.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "session-operators")("FUNTYPE" . "simple")("NAME" . "set-session-var")))("DEFINE-FUNCTION" (("OPT-ARGS" . "named-parameter...")("KEYWORDS" . "define; functions; macros; recursion")("SHORT-DESC" . "Define <var name> as a simple tag.

The only differences between <funref macro-commands define-function> and <funref macro-commands define-tag> are:
<ol>
<li> The <i>whitespace=delete</i> option is assumed.
<li> The <var named-parameter>s are evaluated in the context of the caller, not of the definition of the defun.
<li> By default, a local package is wrapped around the invocation of the defined function.  This can be changed by the use of the <var package=packname> keyword.
</ol>

<example>
<define-function factorial num>
   <if <lt num 2> 1
      <mul num <factorial <sub num 1>>>>
</define-function>
.blank
<factorial 5> --> 120
</example>
")("KEY-ARGS" . "package=packname")("REQ-ARGS" . "name")("SECTION" . "macro-commands")("FUNTYPE" . "complex")("NAME" . "define-function")))("IN-PACKAGE" (("OPT-ARGS" . "")("SHORT-DESC" . "Evaluate <var body> in an environment where variables which are not specifically prefixed with a package name are looked up and stored within <var package-name>.

The special package name <code>\"local\"</code> creates an anonymous package within which to work.  The contents of local packages are only accessible within the expressions surrounded by the <code>in-package</code> operator.
")("KEY-ARGS" . "")("REQ-ARGS" . "package-name")("SECTION" . "packages")("FUNTYPE" . "complex")("NAME" . "in-package")))("ARRAY-APPEND" (("OPT-ARGS" . "")("KEYWORDS" . "arrays")("SHORT-DESC" . "Adds <var item> as the last array element of the contents
of <var arrayvar>.  This is especially useful in conjunction with <funref arrays foreach> as a <i>collector</i>:

<example>
<foreach name allnames>
  <if <satifies-criteria <get-var name>>
     <array-append <get-var name> useful-names>>
</foreach>
</example>

See also <funref arrays array-add-unique>.
")("KEY-ARGS" . "")("REQ-ARGS"  "item" "arrayvar")("SECTION" . "arrays")("FUNTYPE" . "simple")("NAME" . "array-append")))("MSQL::DATABASE-SAVE-PACKAGE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Save the variables in <var package> associated with the value <var key> in column <var keyname> in the table <var tablename> of the database referenced by <var dbvar>.

This only saves variables which have names matching existing table fields. Package prefixes are stripped from the
variables, and the symbol name is used as the column
name to store the data. Symbol names and column names
are treated in a case-insensitive manner.

<code>msql::database-save-package</code> is implemented to
first attempt to do a SQL INSERT into the table, and if
that fails to try a UPDATE query, with <var keyname=key>.

Example: Say we want to save  some information about employee Kate Mulgrew, in a table of employees, which
has a primary key field named \"id\", and we want to
save this record with id=103:

<example>



 <set-var baz::name=\"Kate Mulgrew\" baz::age=45 baz::salary=34000 
    baz::dept=travel>
  
  <set-var result=<msql::database-save-package mydb 103 baz
					       table=employees keyname=id>>
</example>



If a variable in the package you are saving corresponds
to a column with a numeric field type, and the value of the variable is the empty string, the system will attempt to store
a NULL value into this field of the record. If the table
does not support NULL values on that column, the operation will fail.")("KEY-ARGS"  "keyname=fieldname" "table=tablename")("REQ-ARGS"  "dbvar" "key" "package")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-save-package")))("ENV::EXEC-PATH" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The list of directories that <funref file-operators cgi-exec> will search when looking up the location of a command.

Each component is a path to a directory, without the final trailing slash, separated from its neighbors by a colon character (<code>:</code>).

For example:

<example>
   <set-var env::path=\"/www/bin:/www/docs/cgi-bin\">
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "variables")("FUNTYPE" . "variable")("NAME" . "env::exec-path")))("MHTML::UNPARSED-HEADERS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "When set to true, indicates to the <meta-html> Engine that the server is expecting the engine to produce all of the <code>HTTP</code> results, and not just the <code>HTML</code> results.

This variable is automatically set in the <meta-html> server, and when the Engine is run under a name beginning with <code>\"nph-\"</code>.

You can turn this variable on or off during the invocation of a specific page to control the behavior of both the server and engine.

<complete-example>
    <get-var mhtml::unparsed-headers>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::unparsed-headers")))("ODBC::DATABASE-TABLES-INFO" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns an array of alists, one per table in the database.

   Each alist contains database-specific information about
the table, including at least
   the NAME of the table.
   ((name . \"table_name\"))

 The optional tablemumble args are ANSI SQL regexp patterns.

The optional RESULT argument specifies a variable to
put the result array into.")("KEY-ARGS"  "result=var" "tabletype=expression" "tablequalifier=expression" "tablename" "tableowner=expression")("REQ-ARGS" . "dbvar")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-tables-info")))("STREAM-GET-CONTENTS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Reads the contents of the stream <var stream> into the binary variable <var var>.  You had better understand binary variables before you use this. However, you can easily use this in conjunction with <funref stream-operators stream-put-contents>, and <funref language-operators coerce-var>.
")("KEY-ARGS" . "")("REQ-ARGS"  "stream" "var")("SECTION" . "stream-operators")("FUNTYPE" . "simple")("NAME" . "stream-get-contents")))("PACKAGE-TO-ALIST" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns a Lisp readable string containing the names and values of the variables in <var package>.  If <var strip=true> is supplied, the package name is removed from the variables before placing them in the list.  See the following code sequence:


<complete-example>
<set-var
  foo::bar=baz
  foo::array[0]=Elt-0
  foo::array[1]=Elt-1>

  The contents of Foo: <package-to-alist foo>
The stripped contents: <package-to-alist foo strip=true>
</complete-example>
")("KEY-ARGS" . "strip=true")("REQ-ARGS" . "package-name")("SECTION" . "packages")("FUNTYPE" . "simple")("NAME" . "package-to-alist")))("CGI-ENCODE" (("OPT-ARGS" . "var2...")("KEYWORDS" . "")("SHORT-DESC" . "A CGI readable string is created from the names of
<var var1 ... varn> and the associated values of those variables.  For example, if the variable <code>FOO-VAR</code> has the value <code>\"Foo & Value\"</code>, then the invocation
<set-var foo-var=\"Foo & Value\">
<complete-example>
<cgi-encode FOO-VAR>
</complete-example>

Given the optional keyword argument of <var preserve-case=true>, <code>cgi-encode</code> encodes the variables preserving the case of them as they were input.

Thus,
<complete-example>
<cgi-encode Foo-Var preserve-case=true>
</complete-example>
")("KEY-ARGS" . "preserve-case=true")("REQ-ARGS" . "var1")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "cgi-encode")))("MSQL::DATABASE-TABLE-FIELDS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "List all the fieldnames for a table. This must be done with a database already open, i.e., within the scope of a <example code><msql::with-open-database></example>.

Returns an array of column names, or sets the value of <var varname> if supplied.
")("KEY-ARGS" . "result=varname")("REQ-ARGS"  "dbvar" "tablename")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-table-fields")))("MHTML::EXEC-PATH" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "MHTML::EXEC-PATH is what gets passed in the environment to CGI programs as PATH.  Choose carefully.

The default value of this variable in the <b>Mhttpd</b> server is:

<example>
   <set-var mhtml::exec-path =
     <concat <get-var mhtml::server-root>/bin:/bin
             :<get-var mhtml::document-root>/cgi-bin
             :/usr/bin:/usr/local/bin:/usr/ucb>>
</example>

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::exec-path")))("ODBC::CURSOR-GET-COLUMN" (("OPT-ARGS" . "")("KEYWORDS" . "SQL query ")("SHORT-DESC" . "This can be called with  a cursor which is the result from a call to database-exec-query.

It gets the data  from the current result set, in column numbered <var column-number> (starting at column 0).
")("KEY-ARGS" . "")("REQ-ARGS"  "cursor" "column-number")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::cursor-get-column")))("MHTML::INHIBIT-COMMENT-PARSING" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "When this variable is set to a non-empty value, the triple semi-colon comment feature is disabled.

You may need this for complex applications where you are deliberately shipping the source of a <meta-html> document to the client.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::inhibit-comment-parsing")))("DEBUGGING-OUTPUT" (("OPT-ARGS" . "")("KEYWORDS" . "debug; trouble-shoot; troubleshoot")("SHORT-DESC" . "By placing the <code><b>&lt;DEBUGGING-OUTPUT&gt;</b></code> tag somewhere in the page, you mark the location at which the <meta-html> engine, server, or standalone processer should place any debugging statements which have been collected during the processing of the statements in the current page.

Without the presence of this tag, no debugging information will be displayed as part of the final output.

We recommend that you always place this tag somewhere in the output page, whenever that output is an HTML document, as opposed to a standalone script.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "DEBUGGING-OUTPUT")))("MUL" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . " Returns the product of <var arg1> and <var arg2>.

  <example>
    <mul 12 2> --> 24
  </example>
")("KEY-ARGS" . "")("REQ-ARGS"  "arg1" "arg2")("SECTION" . "arithmetic-operators")("FUNTYPE" . "simple")("NAME" . "mul")))("WHEN" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Evaluate <var test>.  If the result is a non-empty string,
then execute the <var body> statements.  This is a cleaner way to handle optional multiple statement execution rather than dealing with quoting everything inside of an <funref variables if> form.
")("KEY-ARGS" . "")("REQ-ARGS" . "test")("SECTION" . "flow-control")("FUNTYPE" . "complex")("NAME" . "when")))("MHTML::CGI-EXTENSIONS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "An array of file name extensions that specifies to the MHTTPD server the file name extensions which indicate that the file is really a CGI program to be executed.

<example>
  <set-var mhtml::cgi-extensions[0]=\".pl\">
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::cgi-extensions")))("MSQL::DATABASE-TABLES" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Return the names of the tables in the database referenced by <var dbvar> as a newline separated list.  If <var VARNAME> is supplied, it is the name of the variable to receive the table names. This must be done with a database already open, i.e., within the scope of a <example code><with-open-database></example>.
")("KEY-ARGS" . "result=varname")("REQ-ARGS" . "dbvar")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-tables")))("MHTML::SERVER-NAME" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "MHTML::SERVER-NAME is the name that this server should advertise.  If you do not set it, the value of the current host's name is used.  On Unix systems, this is the result of calling <code>gethostname()</code>.

<complete-example>
    <get-var mhtml::server-name>
</complete-example>

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::server-name")))("STREAM-WRITABLE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns <code>\"true\"</code> if <var stream> is an open stream which
was opened with a mode of <code>write</code>, <code>append</code>,
<code>write-create</code> or <code>read-write</code>, or nothing
otherwise.")("KEY-ARGS" . "")("REQ-ARGS" . "stream")("SECTION" . "stream-operators")("FUNTYPE" . "simple")("NAME" . "stream-writable")))("CGI-DECODE" (("OPT-ARGS" . "package")("KEYWORDS" . "")("SHORT-DESC" . "Decode <var string> into <var package>.

If <var package> is not specified the current package is used.

<var STRING> is a string that might have appeared in <code>QUERY_STRING</code> or the contents of the data that was posted to a document, such that it consists of name value pairs:

<example>
FOO=bar&STRING=this+is+a+string%2C+other+chars
</example>

<var PACKAGE> is the name of a package to bind the variables in.  So, given the above example as the text in a variable called <var STRING>, here is what you get:

<complete-example>
<set-var string=\"FOO=bar&STRING=a+string%2C+other+chars\">
<cgi-decode <get-var string> mypack>
<get-var mypack::string>
</complete-example>

Also see <funref variables cgi-encode>.
")("KEY-ARGS" . "")("REQ-ARGS" . "string")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "cgi-decode")))("IFEQ" (("OPT-ARGS"  "then" "else")("KEYWORDS" . "")("SHORT-DESC" . "The <var this> and <var that> clauses are evaluated.
If the results are text-wise identical, then the <var then>
clause is evaluated, otherwise, the <var else> clause is
evaluated.  If <var caseless=true> is given, the text-wise
comparison of the values is done with no regard to upper and lower
case distinctions.
")("KEY-ARGS" . "caseless=true")("REQ-ARGS"  "this" "that")("SECTION" . "flow-control")("FUNTYPE" . "simple")("NAME" . "ifeq")))("DBM::UNSET-VAR" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Deletes any association for <var name> in the open database referenced by <var dbvar>.
")("KEY-ARGS" . "")("REQ-ARGS" . "dbvar")("SECTION" . "direct-dbm-access")("FUNTYPE" . "simple")("NAME" . "dbm::unset-var")))("VAR-CASE" (("OPT-ARGS"  "{name=value" "consequent}..." "default" "default-consequent")("KEYWORDS" . "conditional; comparison")("SHORT-DESC" . "For each <var NAME=VALUE> pair, the value of <var NAME> is string-wise compared with <var VALUE>.  If they are identical, then the corresponding <var CONSEQUENT> code is performed, and its value is the return value of the <example code><var-case></example> form.

If none of the clauses match, and there is a <code>DEFAULT</code> clause, then the <var DEFAULT-CONSEQUENT> is evaluated, and its return value is the return value of the <example code><var-case></example> form.

<code>var-case</code> is especially useful as a `traffic
switch' to select one of several actions based on a user button press.

For example:

<example>
<var-case
   action=\"Save Files\"	      <save-files <get-var posted::files[]>>
   action=\"Delete Files\"      <delete-files <get-var posted::files[]>>
   action=\"Rename Files\"      <redirect
                                 rename-files.mhtml?<cgi-encode files>>>
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "flow-control")("FUNTYPE" . "simple")("NAME" . "var-case")))("DIV" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . " Returns the quotient of <var arg1> and <var arg2>.

  <example>
    <div 12 2> --> 6
    <div 10 3> --> 3
  </example>
")("KEY-ARGS" . "")("REQ-ARGS"  "arg1" "arg2")("SECTION" . "arithmetic-operators")("FUNTYPE" . "simple")("NAME" . "div")))("EQ" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns the string <code>\"true\"</code> when the number value of <var arg1> is equal to the number value of <var arg2>.
")("KEY-ARGS" . "")("REQ-ARGS"  "arg1" "arg2")("SECTION" . "relational-operators")("FUNTYPE" . "simple")("NAME" . "eq")))("ENV::HTTP_REFERER" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "A synonym for <varref mhtml::referer>.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "env::http_referer")))("%%READ" (("OPT-ARGS" . "expression")("KEYWORDS" . "evaluation; read-eval-print")("SHORT-DESC" . "Internal function which performs Meta-HTML reading.

If you think that you need this in your program, you
probably are doing something wrong.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "%%read")))("ODBC::WITH-OPEN-DATABASE" (("OPT-ARGS" . "")("KEYWORDS" . "SQL ODBC")("SHORT-DESC" . "Create an environment in which other ODBC database commands can be given.  First, the database referenced by <var dbname> is locked and opened, and the resultant database handle is bound to the variable named by <var dbvar>.  Then, the <var body> code is executed.  Finally, the database is closed, and further references to <var dbvar> are meaningless.

Example:
<example>
 <odbc::with-open-database rdb DSN=\"DSN=oracle;host=localhost;database=test\">
...
</odbc::with-open-database>
</example>
")("KEY-ARGS" . "DSN=dsn-string")("REQ-ARGS" . "dbvar")("SECTION" . "odbc-database-operators")("FUNTYPE" . "complex")("NAME" . "odbc::with-open-database")))("MSQL::SQL-TRANSACT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "  Perform transaction, to either commit or rollback all operations on
   the current database connection.

   ACTION can be one of COMMIT or ROLLBACK. 
   If unspecified, ACTION defaults to COMMIT.

NOTE: Transactions are not yet supported by MSQL.")("KEY-ARGS" . "action=COMMIT|ROLLBACK")("REQ-ARGS" . "dbvar")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::sql-transact")))("MSQL::DATABASE-QUERY" (("OPT-ARGS"  "colnames=namelist" "prefixtablenames")("KEYWORDS" . "SQL query ")("SHORT-DESC" . "Select and optionally format records in the database <var db> according to the criterion in <var fexpr>. 

<var query> is an SQL query, which returns a list of
rows.

For each result row, <var expr> is then evaluated, with the  column values of each row bound to their corresponding column name.  If the result of that evaluation is not an empty string, then that record is selected for further processing by either <var format>, <var keys>, or to return in plain text the list of keys. If <var format> is present, it is an expression to evaluate in the context of the database fields, (as with <var expr>).

The example below shows an SQL query which is formatted as
rows of an HTML table. In this case, the <var expr> is simply the constant true, and all of the selection of 
records is done via the SQL query itself. The <var expr> could be used to impose additional conditions to decide whether to invoke the format expression on a row.


<example>
  <msql::with-open-database rdb database=rolodex
			    host=localhost>
  <table border=1>
    <tr><th>Name</th><th>Age</th></tr>
  <msql::database-query rdb true 
			query=\"SELECT * FROM people WHERE name like 'Washington' ORDER BY lastname\"
			format=<prog <tr>
				 <td>
				 <get-var lastname>, <get-var firstname>
				 </td>
				 <td>
				 <get-var age>
				 </td>
				 </tr>>>
    </table>
  </msql::with-open-database>
</example>


If <var keys> is specified, it is the simple name of a variable to receive the array of keys which satisfied <var fexpr>. If you specify an argument for <var keys>, you must
also specify which column to collect the values from, using
the <var keyname> keyword argument.

If the optional argument <var colnames> is supplied, then for each row, column values are bound sequentially to these comma-separated names instead of the column names in the result set.

<example>
<msql::database-query mydb true query=<get-var query>
                      colnames=\"foo.name, bar.name\"
                      format=<prog FOO.NAME IS 
				<get-var foo.name> 
				BAR.NAME IS 
				<get-var bar.name>>>
</example>

If <var prefixtablenames> is non-null, or the database
connection option SQL-PREFIX-TABLENAMES is
  non-null, then for each column in the result set, use the column's table
   name, if it exists, as a prefix to the column name as the variable
   name.")("KEY-ARGS"  "query=query-string" "format=fexpr" "keys=varname" "keyname=fieldname")("REQ-ARGS"  "dbvar" "expr" "query")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-query")))("SUB" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "  Returns the difference of <var arg1> and <var arg2>.

  <example>
    <sub 12 2> --> 10
  </example>
")("KEY-ARGS" . "")("REQ-ARGS"  "arg1" "arg2")("SECTION" . "arithmetic-operators")("FUNTYPE" . "simple")("NAME" . "sub")))("CONCAT" (("OPT-ARGS"  "arg1" "..." "argn")("KEYWORDS" . "")("SHORT-DESC" . "Concatenate all of the arguments given, creating a single token with no intervening whitespace.  This is quite useful for those situations where intervening whitespace would look bad in the output, but the input source would be unreadable without any.

For example:
<example>
 <concat <textarea name=label rows=10 cols=40>
         <get-var-once label>
         </textarea>>
</example>

	    ")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "concat")))("%%EVAL" (("OPT-ARGS" . "expression")("KEYWORDS" . "evaluation")("SHORT-DESC" . "Internal function which performs evaluation.

If you think that you need this in your program, you
probably are doing something wrong.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "%%eval")))("COPY-VAR" (("OPT-ARGS" . "to-var...")("KEYWORDS" . "copying; value exchange;")("SHORT-DESC" . "Copies the variable <var from-var> to each of the named <var to-var>s.

Each <var to-var> becomes the repository of a copy of the information already stored under <var from-var>.  This is a <i>true</i> copy; not an alias to the original variable.

<example>
   <set-var foo=bar>
   <get-var foo>      --> bar
   <get-var new>      --> 
   <copy-var foo new> -->
   <get-var new>      --> bar

   <copy-var *meta-html*::get-var *meta-html*::foo>
   <foo new>          --> bar
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "from-var")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "copy-var")))("DATABASE-LOAD-RECORD" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Load the variables from the record specified by <var key> in the database referenced by <var dbvar>.  If <var prefix=package-name> is given, the record variables are stored into the specified package, instead of the current package.

Upon success, this function returns the string <code>\"true\"</code>.

<example>
<with-open-database db /tmp/file.db mode=read>
  <set-var loaded? = <database-load-record db <get-var name>>>
</with-open-database>

<when <get-var loaded?>>
  The record was loaded successfully.
</when>
</example>
")("KEY-ARGS" . "prefix=package-name")("REQ-ARGS"  "dbvar" "key")("SECTION" . "database-commands")("FUNTYPE" . "simple")("NAME" . "database-load-record")))("MSQL::NUMBER-OF-ROWS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns the number of rows which were found as a result of the last query issued for <var cursorvar>.
")("KEY-ARGS" . "")("REQ-ARGS" . "cursorvar")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::number-of-rows")))("ODBC::GET-CONNECT-OPTION" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Performs ODBC SQLGetConnectOption call.  Returns the requested
data value specified by <var fInfoType>

Valid values for <var fInfoType> are:

<example>
SQL_ACCESS_MODE  	
SQL_AUTOCOMMIT		
SQL_LOGIN_TIMEOUT 	
SQL_OPT_TRACE 		
SQL_OPT_TRACEFILE 	
SQL_TRANSLATE_DLL 	
SQL_TRANSLATE_OPTION 	
SQL_TXN_ISOLATION 	
SQL_CURRENT_QUALIFIER 	
SQL_ODBC_CURSORS	
SQL_QUIET_MODE 		
SQL_PACKET_SIZE 	
</example>




")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "fInfoType")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::get-connect-option")))("UNDEF" (("OPT-ARGS" . "...")("KEYWORDS" . "")("SHORT-DESC" . "Remove the definition of a user-defined <funref macros defun>, <funref macros defmacro> or <funref macros defsubst>.  For every <var name> that has been defined in this way, the definition is removed.
")("KEY-ARGS" . "")("REQ-ARGS" . "name")("SECTION" . "macro-commands")("FUNTYPE" . "simple")("NAME" . "undef")))("PACKAGE-DELETE" (("OPT-ARGS" . "")("SHORT-DESC" . "Remove the definition of the packages named by <var package-name>, and all of the variables defined within them.
")("KEY-ARGS" . "")("REQ-ARGS"  "package-name" "...")("SECTION" . "packages")("FUNTYPE" . "simple")("NAME" . "package-delete")))("MHTML::DECIMAL-PLACES" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Controls the number of decimal places which arithmetic functions produce.  The default value of this variable is <code>2</code>, but for times when you need greater resolution in your calculations, you may wish to set it higher.

<complete-example>
    <set-var mhtml::decimal-places = 10>
    9 / 3.0 = <div 9 3.0>
   10 / 3.0 = <div 10 3.0>
    9 / 3   = <div 9 3>
   10 / 3   = <div 10 3>
    <unset-var mhtml::decimal-places>
    9 / 3.0 = <div 9 3.0>
   10 / 3.0 = <div 10 3.0>
    9 / 3   = <div 9 3>
   10 / 3   = <div 10 3>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "arithmetic-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::decimal-places")))("PAGE-INSERT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Insert <var content> directly into the current page at the offset specified by <var offset>.

In most cases, there is never any need to do this.  For some very strange situations involving direct communication with both the Web server, and the connecting client, it is conceivably possible that you would use this command.

But I doubt it.
")("KEY-ARGS" . "")("REQ-ARGS"  "offset" "content")("SECTION" . "page-operators")("FUNTYPE" . "simple")("NAME" . "page-insert")))("WITH-OPEN-STREAM" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Create an environment in which <var var> is bound to the
<i>indicator</i> of an open stream, named by <var name>.

The stream is either of type <code>FILE</code>, or <code>TCP</code>, in which case it is an open network connection.  When <var type> is <code>TCP</code>, <var name> specifies the host and port to connect to, in the form <code>Hostname:Port-Number</code>.  <var port-number> can either be a symbolic name which is widely recognized (e.g., <code>SMTP</code>), or the digits which make up the port number, (e.g., <code>25</code>).  The possible values for <var mode> are:

<ul>
  <li> <code>READ</code>:<br>
  The stream is opened for reading only.  The underlying object must already exist.

  <li> <code>WRITE</code>:<br>
  The stream is opened for writing only.  The underlying object must already exist.

  <li> <code>READ-WRITE</code>:<br>
  The stream is opened for both reading and writing.  The underlying object must already exist.

  <li> <code>APPEND</code>:<br>
  The stream is opened for writing only.  If the underlying object did not already exist, it is created.  Information written to this stream appears after any information that was already present in the underlying object.

  <li> <code>WRITE-CREATE</code>:<br>
  The stream is opened for writing only.  The underlying object is created fresh, even if it had already existed. </ul>
")("KEY-ARGS"  "type=(file|tcp)" "mode=open-mode")("REQ-ARGS"  "var" "name")("SECTION" . "stream-operators")("FUNTYPE" . "complex")("NAME" . "with-open-stream")))("GT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns the string <code>\"true\"</code> when the numeric value of
<var arg-1> is greater than the numeric value of <var arg-2>.
")("KEY-ARGS" . "")("REQ-ARGS"  "arg1" "arg2")("SECTION" . "relational-operators")("FUNTYPE" . "simple")("NAME" . "gt")))("DBM::NEXT-KEY" (("OPT-ARGS" . "")("KEYWORDS" . "dbm;ndbm;perl databases;gdbm")("SHORT-DESC" . "Returns the \"next\" key in the database referenced by <var dbvar> starting after the key <var afterkey>.
")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "afterkey")("SECTION" . "direct-dbm-access")("FUNTYPE" . "simple")("NAME" . "dbm::next-key")))("CLEANUP-WHITESPACE" (("OPT-ARGS" . "")("KEYWORDS" . "whitespace; file")("SHORT-DESC" . "Reduces the amount of whitespace in the output page to the minimum required.  This function carefully avoids the contents of <example code><pre> ... </pre></example> constructs, as well as any material appearing in a <example code><textarea ...> ... </textarea></example> construct.

Placed as the last instruction on a page, it is an effective way to reduce the amount of data sent back over the network to the connecting browser.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-operators")("FUNTYPE" . "simple")("NAME" . "cleanup-whitespace")))("MHTML::REFERER" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The value of the <code>HTTP</code> <i>Referer</i> MIME header which the client browser sent along in its request.

You might use this variable, if it is present, as the target of an anchor:

<example>
    <a href=\"<get-var mhtml::referer>\">
     <b>Back</b> to referring document.
    </a>
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::referer")))("MHTML::ACCESS-LOG" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The complete path to the file where the MHTTPD server should keep the per-page access information.

The access log contains lines written in <a href=\"http://www.w3.org/hypertext/WWW/Daemon/User/Config/Logging.html#common-logfile-format\">W3c's Common Logfile Format</a>.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::access-log")))("MHTML::REQUIRE-DIRECTORIES" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "An array of directory names to be searched through in order by <funref file-operators require>.  The directories should be specified without the trailing slash.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "file-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::require-directories")))("DEFINE-TAG" (("OPT-ARGS" . "named-parameter...")("KEYWORDS" . "macros; functions; defining commands")("SHORT-DESC" . "Define <var name> as a simple tag.  Within <var body>, the values of <code>%0...%9</code> are defined to be the positional arguments that were found in the opening tag of the invocation, and <code>%body</code> is all of that material in a single string.

If any <var named-parameter>s are supplied, the values that were passed in the opening tag are evaluated and bound to the named parameters.

A keyword argument of <var package-name> wraps the entire body of the macro in an <funref packages in-package> statement.

The keyword argument <var whitespace> can be set to the string <code>delete</code> to remove whitespace from the starts and ends of lines in the subst definition before it is stored.  This effectively concatenates all of the lines of the subst definition into a single long line.

Also see <funref macro-commands define-function> and <funref macro-commands define-container>.

")("KEY-ARGS"  "package=package-name" "whitespace=delete")("REQ-ARGS" . "name")("SECTION" . "macro-commands")("FUNTYPE" . "complex")("NAME" . "define-tag")))("DATABASE-NEXT-KEY" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Return the \"next\" key in the database.  The key is found by looking at <var after-key>, which makes this function suitable for calling in a loop.  For example, the following code iterates over an entire database.

<example>
<with-open-database db /file.db mode=read>
  <set-var key=<database-first-key db>>
  <while <get-var key>>
    <package-delete record>
    <set-var loaded? =
      <database-load-record db <get-var key> package=record>>
    Key: <get-var key>, Name: <get-var record::name>
    <set-var key = <database-next-key db <get-var key>>>
  </while>
</with-open-database>
</example>
")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "after-key")("SECTION" . "database-commands")("FUNTYPE" . "simple")("NAME" . "database-next-key")))("MHTML::SERVER-ROOT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "MHTML::SERVER-ROOT is the root location for your server.  You might store the configuration, logging, and server specific files there, for example.  You currently cannot store your CGIs there, because that directory must be underneath <varref MHTML::DOCUMENT-ROOT>.

The pathname should not end in a slash.

<complete-example>
    <get-var mhtml::server-root>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::server-root")))("MSQL::DATABASE-SET-OPTIONS" (("OPT-ARGS"  "SQL-ESCAPE-CHARACTER-CODE=int" "SQL-TRUNCATE-COLUMNS=boolean")("KEYWORDS" . "")("SHORT-DESC" . "Sets various database-specific options.

SQL-ESCAPE-CHARACTER-CODE sets the character which is used
to escape single quotes in strings.

If SQL-TRUNCATE-COLUMNS is non-null, then queries composed
by database-save-record and database-save-package will
have character string field data automatically truncated
to the max column width of the field being stored into, before
the query is ever sent to the SQL server.")("KEY-ARGS" . "")("REQ-ARGS" . "dbvar")("SECTION" . "odbc-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-set-options")))("GET-SESSION-VAR" (("OPT-ARGS" . "name...")("KEYWORDS" . "")("SHORT-DESC" . "Get the value for <var name> from the session database record
associated with the current session.")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "session-operators")("FUNTYPE" . "simple")("NAME" . "get-session-var")))("CREATE-SESSION" (("OPT-ARGS"  "var1[=missing-code]" "..." "varn=[missing-code]")("KEYWORDS" . "")("SHORT-DESC" . "Create a session, and place the session identifier in the variable <code>SID</code>.  The <i>key</i> for the session is created by concatenating the values of the <var var>s together, separated by hyphens (<code>-</code>).  If a <var var> doesn't have a value, but does have an optional <var missing-code> assignment, then the session is not created, and the <var missing-code> for that variable is evaluated.  If all of the variables have values in the page (or have no <i>missing</i> action), and the session could not be created, then <var altcode> is evaluated if it is present.

Finally, if <var allow-multiple> is present, it indicates that the <i>key</i> does not have to be unique; it is enough that the session is created and a session ID returned.
")("KEY-ARGS"  "alt=altcode" "allow-multiple")("REQ-ARGS" . "")("SECTION" . "session-operators")("FUNTYPE" . "simple")("NAME" . "create-session")))("IF" (("OPT-ARGS"  "then" "else")("KEYWORDS" . "")("SHORT-DESC" . "First <var test> is evaluated.  If the result is a non-whitespace only
string, the <var then> clause is evaluated, otherwise, the
<var else> clause is evaluated.  Although <meta-html> has an
<code>or</code> function, you can efficiently test for the presence of any of
a group of variables with code similar to the following:

<example>
  <if <get-var foo bar>
      \"Either FOO or BAR is present\"
    \"Neither FOO nor BAR is present\">
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "test")("SECTION" . "flow-control")("FUNTYPE" . "simple")("NAME" . "if")))("%%READ-PACKAGE-FILE" (("OPT-ARGS" . "")("KEYWORDS" . "binary; storage; storing package files")("SHORT-DESC" . "Reads packages from <var filename>.  <var filename> should contain the binary representation of packages that were written out with <funref packages %%write-package-file>, and nothing else.

Returns a number indicating the number of packages read from the file.

This is used internally by <funref file-operators require>.
")("KEY-ARGS" . "")("REQ-ARGS" . "filename")("SECTION" . "packages")("FUNTYPE" . "simple")("NAME" . "%%read-package-file")))("FOREACH" (("OPT-ARGS" . "")("KEYWORDS" . "arrays; looping")("SHORT-DESC" . "Perform <var body> with <var elementvar> bound to successive
memebers of <var arrayvar>, starting with the element at <var start> (default 0), and ending at <var end> (default
<example code><array-size ARRAYVAR></example>), advancing by <var step> (default 1).

The <code>foreach</code> command is the basic array looping device in <Meta-HTML>.  It is guaranteed to iterate over each element that you specify, whether that element is the empty string or not.

Starting with the simple array:
<set-var array[]=\"0\\n1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\">
<example>
<set-var array[]=\"0\\n1\\n2\\n3\\n4\\n5\\n6\\n7\\n8\\n9\">
</example>

we can print out the odd numbers of this array by using values for both <var start> and <var step>:

<complete-example>
<foreach x array start=1 step=2> <get-var x>, </foreach>
</complete-example>

or, we can produce a \"countdown\" with a negative value for <var step>:

<complete-example>
<foreach x array step=-1> <get-var x>, </foreach> BOOM!
</complete-example>
")("KEY-ARGS"  "start=x" "end=x" "step=x")("REQ-ARGS"  "elementvar" "arrayvar")("SECTION" . "arrays")("FUNTYPE" . "complex")("NAME" . "foreach")))("SID" (("OPT-ARGS" . "")("KEYWORDS" . "sessions; session-id")("SHORT-DESC" . "This variable contains the current session ID.

The session ID is passed to and from the browser by either the use of HTTP Cookies, or in the URL, as the first element of the path.

Normally, you never need to reference this variable directly, since the various internal functions which deal with sessions know how to set, get, and/or modify it without your help.

Related functions: <funref \"Session Operators\" create-session>, <funref \"Session Operators\" delete-session>, <funref \"Session Operators\" set-session-var>, etc.")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "session-operators")("FUNTYPE" . "variable")("NAME" . "sid")))("STREAM-PUT-CONTENTS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Writes the contents of the binary variable <var var> to <var stream>.
You had better understand binary variables before you use this.
However, you can easily use this in conjunction with
<funref stream-operators stream-get-contents>.
")("KEY-ARGS" . "")("REQ-ARGS"  "stream" "var")("SECTION" . "stream-operators")("FUNTYPE" . "simple")("NAME" . "stream-put-contents")))("SUBST-IN-PAGE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Replaces all occurrences of <var this> with <var with-that> in the current page.  Both <var this> and <var with-that> are evaluated before the replacement is done.  <var this> can be any regular expression allowed by the POSIX extended regular expression matching.

This command can be useful when included as part of a footer
<code>include</code> file.  For example, you could replace all occurrences of <code>%name%</code> with a the value of the variable <code>FirstName</code> by writing:

<example>
  <subst-in-page %name% <get-var forms::FirstName>>
</example>
")("KEY-ARGS" . "")("REQ-ARGS"  "this" "with-that")("SECTION" . "page-operators")("FUNTYPE" . "simple")("NAME" . "subst-in-page")))("MHTML::URL-TO-DIR-SANS-SID" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The complete URL to the directory containing the current document.  This includes protocol, host, and relative prefix information, but excludes the session ID if one were present.

<complete-example>
<get-var mhtml::url-to-dir-sans-sid>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::url-to-dir-sans-sid")))("LT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns the string <code>\"true\"</code> when the numeric value of
<var arg-1> is less than the numeric value of <var arg-2>.
")("KEY-ARGS" . "")("REQ-ARGS"  "arg1" "arg2")("SECTION" . "relational-operators")("FUNTYPE" . "simple")("NAME" . "lt")))("PAD" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Pads <var string> to a length of <var total-size>.  <var align> can
be one of <code>LEFT</code>, <code>MIDDLE</code>, or
<code>RIGHT</code> (the default).

<code>PAD</code> inserts the correct number of spaces to make the
input argument take the desired number of spaces (presumably for use
in a <example code><pre> ... </pre></example> statement).

The optional arg <code>TRUNCATE</code> says to force the string to be
the specified length.

Before any padding is done, leading and trailing whitespace is removed
from <var string>.

Examples:

<example>
  <pad \"Hello\" 10>              --> \"     Hello\"
  <pad \"Hello\" 10 align=left>   --> \"Hello     \"
  <pad \"Hello\" 10 align=middle> --> \"  Hello   \"
  <pad \"  Heckle  \" 4 truncate> --> \"Heck\"
</example>
")("KEY-ARGS"  "align=(right|left|middle)" "truncate")("REQ-ARGS"  "string" "total-size")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "pad")))("SET-SESSION-TIMEOUT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Make the current session time out after <var VALUE> minutes.
You cannot supply the value of (<code>0</code>); that is accomplished
with <funref sessions delete-session>.
")("KEY-ARGS" . "")("REQ-ARGS" . "value")("SECTION" . "session-operators")("FUNTYPE" . "simple")("NAME" . "set-session-timeout")))("MHTML::REMOTE-USER" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The value of the environment variable <varref ENV::REMOTE_USER> as received by the server.

When <code>Basic Authorization</code> is supplied by a client, this variable contains the username which the connected user supplied.  Do NOT confuse this with ENV::REMOTE_IDENT!
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "variables")("FUNTYPE" . "variable")("NAME" . "mhtml::remote-user")))("REQUIRE-SESSION" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Check that the current session is valid and not timed out.  If either
of those things are true, the respective code is evaluated.  Usually,
the targets of <var TIMEOUT> and <var MISSING> are a <funref files redirect>
command which points to a page explaining the problem.
<p>
You could force an anonymous session with the following code:

<example>
  <set-var anonymous=\"Anonymous Session\">
  <require-session
    missing=\"<create-session anonymous allow-multiple>
             <redirect <get-var SID>/<get-var mhtml::current-doc>\"
    timeout=<redirect /timed-out.mhtml>>
</example>

In the real world, additional care should be taken when returning new
URLs.  The variable <var mhtml::cookie-compatible> is
<code>true</code> when the attached browser/server combination is
capable of handling HTTP Cookies.  In this case, it is preferable to
use the HTTP Cookie handling facilities instead of returning the
session ID in the URL.  Here is how one might write the above example
to handle both cases:

<example>
<set-var anonymous=\"Anonymous Session\" session-timeout=60>
<require-session
 missing = <prog
             <create-session anonymous allow-multiple>
             <set-session-timeout <get-var session-timeout>>
             <when <not <get-var mhtml::cookie-compatible>>>
             <redirect <concat
                        <get-var mhtml::http-to-host>/
                        <get-var SID><get-var mhtml::relative-prefix>/
                        <get-var mhtml::current-doc>>>
             </when>>
 timeout = <prog
             <set-var SID=\"\">
             <if <get-var mhtml::cookie-compatible>
                 <replace-page
                  <get-var mhtml::relative-prefix>/timedout.mhtml>
               <redirect
                <get-var mhtml::url-to-dir-sans-sid>/timedout.mhtml>>>>
</example>

For more detail on the built-in variables provided by the <meta-html>
Server and CGI Engine, see <secref server-variables>.")("KEY-ARGS"  "missing=missing-code" "timeout=timeout-code")("REQ-ARGS" . "")("SECTION" . "session-operators")("FUNTYPE" . "simple")("NAME" . "require-session")))("MHTML::LOCATION-SANS-SID" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The URL used to connect to the current document, including path information and query strings, but without the protocol, host information, or Session ID.

<complete-example>
<get-var mhtml::location-sans-sid>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::location-sans-sid")))("SUBST-IN-STRING" (("OPT-ARGS"  "regexp" "replacement" "...")("KEYWORDS" . "")("SHORT-DESC" . "Replaces all occurrences of <var regexp> with <var replacement> in <var string>.

<var regexp> can be any regular expression allowed by POSIX extended regular expression matching.

<example>
   <set-var foo=\"This is a list\">
   <subst-in-string <get-var foo> \"is\" \"HELLO\">
        --> \"ThHELLO HELLO a lHELLOt\"

   <subst-in-string \"abc\" \"([a-z])\" \"\\\\1 \"> --> \"a b c \"
</example>

")("KEY-ARGS" . "")("REQ-ARGS"  "string" "regexp" "replacement")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "subst-in-string")))("STREAM-PUT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Writes <var string> to <var stream>.")("KEY-ARGS" . "")("REQ-ARGS"  "stream" "string")("SECTION" . "stream-operators")("FUNTYPE" . "simple")("NAME" . "stream-put")))("RANDOM" (("OPT-ARGS" . "arg")("KEYWORDS" . "")("SHORT-DESC" . "Returns a pseudo-random number between 0 and <var arg> -1.  The distribution is pretty good; calling <example code><random 2></example> returns 0 50% of the time, and 1 the other 50%.

Also see <funref arithmetic randomize>.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "arithmetic-operators")("FUNTYPE" . "simple")("NAME" . "random")))("ODBC::DATABASE-COLUMN-INFO" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . " Returns an alist of properties of a column of a table. Example:
((NAME . \"realname\")(LENGTH . \"30\")(TYPE . \"GSQL_CHAR\")(IS_UNIQUE . \"\")(IS_NULLABLE . \"true\")(QUALIFIER . \"\")(OWNER . \"\")(TYPENAME . \"\")(PRECISION . \"0\")(SCALE . \"0\")(RADIX . \"0\")(TABLE . \"accounts\"))

    This is actually implemented by fetching information on *all*
    columns and selecting the specified one. It is thus more
    efficient, if you are looking for info on several columns, to use
    database-columns-info, and get all the column information in a
    single array.
")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "table" "fieldname")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-column-info")))("RANDOMIZE" (("OPT-ARGS" . "arg")("KEYWORDS" . "")("SHORT-DESC" . "Sets the pseudo-random number generator seed to <var arg>.  The next call to <code>random</code> uses this seed value to find the next pseudo-random number.  There is no return value.

  <example>
    <randomize 10>
    <random 100> --> 28
    <random 100> --> 15
    <randomize 10>
    <random 100> --> 28
  </example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "arithmetic-operators")("FUNTYPE" . "simple")("NAME" . "randomize")))("ARRAY-SIZE" (("OPT-ARGS" . "")("KEYWORDS" . "arrays; length")("SHORT-DESC" . "Returns the number of elements in the array referenced by the variable <var arrayvar>.

Examples:

<complete-example>
<set-var array[]=\"this\">
<array-size array>
</complete-example>

and,

<complete-example>
<array-shift 4 array>
<array-size array>
</complete-example>

")("KEY-ARGS" . "")("REQ-ARGS" . "arrayvar")("SECTION" . "arrays")("FUNTYPE" . "simple")("NAME" . "array-size")))("DEFWEAKMACRO" (("OPT-ARGS" . "")("KEYWORDS" . "macros; substs;functions")("SHORT-DESC" . "<code>defweakmacro</code> is exactly like <funref macro-commands defmacro>, with one exception: at invocation time, the closing tag does not have to be present -- in that case, the invocation is treated as if the definition were a <funref macro-commands defsubst>.

This facility exists primarily to allow the redefinition of standard HTML constructs which allow the closing tag to be missing, and yet, still inexplicably operate correctly.

For example, the <example code><p></example> tag is often used without its closing counterpart of <example code></p></example>.  If you wished to redefine <example code><p></example> to do something special when a closing tag was found, you might write the following definition:

<example>
<defweakmacro p>
  <verbatim><P></verbatim>
  <when %qbody> Look ma! %body See? </when>
  <verbatim></P></verbatim>
</defweakmacro>
</example>

then, a simple <example code><P></example> would produce
<example code><P></P></example code>, while a complex invocation, such as:
<example>
<P> this is a list </P>
</example>
produces
<example>
  <P> Look ma!  this is a list See? </P>
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "macro-name")("SECTION" . "macro-commands")("FUNTYPE" . "complex")("NAME" . "defweakmacro")))("MHTML::DEBUG-LOG" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The complete path to the file where the MHTTPD server should write server specific debugging information.  Generally, this only needs to be defined when you are debugging the server itself.

<complete-example>
   <get-var mhtml::debug-log>
</complete-example>


")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::debug-log")))("MHTML::COOKIE-COMPATIBLE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Indicates whether or not the current client/server pair can pass <a href=\"http://home.netscape.com/newsref/std/cookie_spec.html\">HTTP Cookies</a> back and forth.

When such communication is possible, this variable is set to <code>\"true\"</code>.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "variables")("FUNTYPE" . "variable")("NAME" . "mhtml::cookie-compatible")))("ENV::QUERY_STRING" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The raw query string which was passed in this URL.  In many cases, <meta-html> can create variables in the <code>POSTED</code> package based upon the contents of this string.  In some cases, the string doesn't contain any variable assignments (e.g., when the URL is an imagemap target).  For such cases, you may need direct access to the query string.

<complete-example>
    <get-var env::query_string>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "env::query_string")))("ARRAY-MEMBER" (("OPT-ARGS" . "")("KEYWORDS" . "arrays")("SHORT-DESC" . "Looks up (and returns) the index of <var item> in the contents of the array referenced by <var arrayvar>.

If <var item> is not found, then <code>array-member</code> returns the empty string.

If <var caseless> is non-empty, then the comparison is done without regard to character case.  Otherwise, character case is significant in the location of the item.

<complete-example>
<set-var array[] =
  <prog
     this
     another
     multi word
     thing>>
<array-member \"multi word\" array>
</complete-example>
")("KEY-ARGS" . "caseless=true")("REQ-ARGS"  "item" "arrayvar")("SECTION" . "arrays")("FUNTYPE" . "simple")("NAME" . "array-member")))("MHTML::METAHTML-EXTENSIONS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "An array of file name extensions which indicate that the document to be fetched contains <meta-html> code.

Normally, this variable is set in the server process.

<complete-example>
<get-var mhtml::metahtml-extensions[]>
</complete-example>

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::metahtml-extensions")))("MHTML::CURRENT-URL" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "A synonym for <varref mhtml::location>.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::current-url")))("SYSTEM-ERROR-OUTPUT" (("OPT-ARGS" . "")("KEYWORDS" . "debug; trouble-shoot; troubleshoot")("SHORT-DESC" . "By placing the <code><b>&lt;SYSTEM-ERROR-OUTPUT&gt;</b></code> tag somewhere in the page, you mark the location at which the <meta-html> engine, server, or standalone processer should place any error statements which have been collected during the processing of the statements in the current page.

Without the presence of this tag, no system error information will be displayed as part of the final output.

We recommend that you place this tag somewhere in the page while you are building and testing your application, or, if you are having confusing behavior from an existing application.

Commands which manipulate files may place information about the underlying cause of the error condition here.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "SYSTEM-ERROR-OUTPUT")))("COMMENT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Simply discard the <var body>.  No processing is done, and no output is produced.

A shorthand for commenting source on a single line exists; when the sequence of 3 semicolon character is seen
(<code>;</code><code>;;</code>), then the text from this sequence to the end of the line inclusive is discarded.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "block-commands")("FUNTYPE" . "complex")("NAME" . "comment")))("MHTML::HTTP-PREFIX-SANS-SID" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The portion of the current URL which contains the protocol, host information, but excluding the session ID.

<complete-example>
<get-var mhtml::http-prefix-sans-sid>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::http-prefix-sans-sid")))("AND" (("OPT-ARGS" . "...")("KEYWORDS" . "")("SHORT-DESC" . "Evaluates the <var expr>s until one of them results in the empty string, or they are all exhausted.

The result of this expression is the last value evaluated.
")("KEY-ARGS" . "")("REQ-ARGS" . "expr")("SECTION" . "relational-operators")("FUNTYPE" . "simple")("NAME" . "and")))("TIME" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns the current local time, as measured in seconds since the epoch (12 midnight, December 31, 1969).

This is often useful as input to the <funref language-operators date> operator.  Here is how one might find out the printable date for the time 10 hours from now.

<example>
   <date> --> Wed Jul  3 17:14:53 1996
   <date <add <time> <mul 60 <mul 10 60>>>>
          --> Thu Jul  4 03:14:57 1996
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "time")))("ENV::REMOTE_ADDR" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The Internet Protocol address of the connecting client host, in \"dot\" notation.  You may wish to use <varref env::remote_host> instead.

<complete-example>
    <get-var env::remote_addr>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "env::remote_addr")))("DEFSUBST" (("OPT-ARGS" . "named-parameter...")("KEYWORDS" . "")("SHORT-DESC" . "A synonym for <funref macro-commands define-tag>.
")("KEY-ARGS"  "package=package-name" "whitespace=delete")("REQ-ARGS" . "name")("SECTION" . "macro-commands")("FUNTYPE" . "complex")("NAME" . "defsubst")))("MHTML::VERSION" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Contains the version identification of the currently running interpreter.  This variable is available whereever the interpreter is running, including the <meta-html> server, Engine, and in <code>mdb</code>.

<complete-example>
    <get-var mhtml::version>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::version")))("SYMBOL-INFO" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns information about the symbol <var symbol>.

The information is two lines:

<ol>
<li> The type of the symbol, either STRING, BINARY, or FUNCTION.
<li> The \"size\" of the symbol.
</ol>

For STRING variables, the size value is the number of elements in the array.

For BINARY variables, the size value is the number of bytes of binary data stored within.

The size value is zero for all other variable types.
")("KEY-ARGS" . "")("REQ-ARGS" . "symbol")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "symbol-info")))("DATE" (("OPT-ARGS" . "epoch-seconds")("KEYWORDS" . "")("SHORT-DESC" . "Returns the local date as a string of 24 characters.

The output looks like <code><date></code>.

Given the optional argument <var epoch-seconds>, this number is treated as the number of seconds since 12 midnight, December 31st, 1969, and is converted into the current date.

Also see the <funref language-operators time> function.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "date")))("ODBC::DATABASE-SAVE-RECORD" (("OPT-ARGS" . "var...")("KEYWORDS" . "SQL save ")("SHORT-DESC" . "Does an INSERT and UPDATE to try to store the data into <var table> using the single key <var keyname>, with value <var key>.

NOTE: If the key field for table you are using is not configured as the <i>primary key</i>, then it is possible to create duplicate entries in the database.


   If you have a variable which does not match a field name
   in the table, that variable is silently ignored.

   If you try to save character data into a numeric field,
   the insert or update will fail, and you can check the
   error message in odbc::odbc-error-message[]
")("KEY-ARGS"  "table=tablename" "keyname=fieldname")("REQ-ARGS"  "db" "key" "table" "keyname")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-save-record")))("PAGE-SEARCH" (("OPT-ARGS" . "end")("KEYWORDS" . "")("SHORT-DESC" . "Returns a number representing the number of characters from the start of the current page that <var regex> appears.  If <var start-offset> is not zero, then the search starts from that many characters from the beginning of the page.

The optional argument <var end> says to return the position of the last character which matched <var regex>, instead of the first.

Why would you use this?
")("KEY-ARGS" . "")("REQ-ARGS"  "start-offset" "regex")("SECTION" . "page-operators")("FUNTYPE" . "simple")("NAME" . "page-search")))("MHTML::HTTP-TO-HOST" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "A synonym for <varref mhtml::http-prefix>.

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::http-to-host")))("VERBATIM" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Insert <var body> verbatim, avoiding doing any processing on
the contents.  If the positional argument <var QUOTE> is given, occurrences of characters with special meaning to <b>HTML</b> are replaced with the <b>HTML</b> code to produce that character in the output page.

Contrast this with <funref block-commands comment>.")("KEY-ARGS" . "quote")("REQ-ARGS" . "")("SECTION" . "block-commands")("FUNTYPE" . "complex")("NAME" . "verbatim")))("STREAM-READABLE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns <code>\"true\"</code> if <var stream> is an open stream which
was opened with a mode of <code>read</code> or
<code>read-write</code>, or nothing otherwise.
")("KEY-ARGS" . "")("REQ-ARGS" . "stream")("SECTION" . "stream-operators")("FUNTYPE" . "simple")("NAME" . "stream-readable")))("ENV::SERVER_PORT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The port on which the current web server is listening for connections.

<complete-example>
   <get-var env::server_port>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "env::server_port")))("DEBUGGING-ON" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Turns on debugging for the <var function-name>s mentioned, setting the level of output to <var level>.  <var level> is a number between <code>0</code> (the least amount of debugging info) and <code>10</code> (the maximum amount of debugging info).

The output is placed into the Meta-HTML internal debugger buffer, and can be placed into an output page by simply placing the tag &lt;<funref language-operators DEBUGGING-OUTPUT>&gt; somewhere in the page.
")("KEY-ARGS" . "function-name=level")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "debugging-on")))("MHTML::CURRENT-URL-SANS-SID" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "A synonym for <varref mhtml::location-sans-sid>.

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::current-url-sans-sid")))("MSQL::DATABASE-DELETE-RECORD" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Deletes the specified record in the database referenced by <var dbvar>.  The record to delete is specified by <var key>.

You must supply <var tablename> and <var fieldname>, where <fieldname> is the name of the primary key field.")("KEY-ARGS"  "table=tablename" "keyname=fieldname")("REQ-ARGS"  "dbvar" "key")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-delete-record")))("ODBC::DATABASE-EXEC-SQL" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Executes the SQL query in  QUERY-STRING, on the open
database connection specified by DBVAR.

Returns TRUE if no errors are encountered.

This function differs from  ODBC::DATABASE-EXEC-QUERY
in that it does not return any cursor, so there
is no way to get results back from the execution
of your SQL command. Thus, it is most useful for
sending commands which expect no  return values,
such as a SQL DELETE statement:

<pre>
<odbc::database-exec-sql mydb
   \"DELETE FROM employees WHERE emp_id = 1000\">
</pre>")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "query-string")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-exec-sql")))("ADD" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns the sum of <var arg1> and <var arg2>.
")("KEY-ARGS" . "")("REQ-ARGS"  "arg1" "arg2")("SECTION" . "arithmetic-operators")("FUNTYPE" . "simple")("NAME" . "add")))("SUBST-IN-VAR" (("OPT-ARGS"  "this" "with-that" "...")("SHORT-DESC" . "Replaces all occurrences of <var this> with <var with-that> in the contents of the variable named <var varname>.  Both <var this> and <var with-that> are evaluated before the replacement is done. <var this> can be any regular expression allowed by the POSIX extended regular expression matching.  This command can be useful when parsing the output of <funref osfuncs cgi-exec>.
")("KEY-ARGS" . "")("REQ-ARGS" . "varname")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "subst-in-var")))("MHTML::SERVER-PORT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "MHTML::SERVER-PORT is the port on which this server should answer HTTP requests.  If you do not set it, the value is <code>80</code>.

<complete-example>
    <get-var mhtml::server-port>
</complete-example>


")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::server-port")))("GET-FILE-PROPERTIES" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Return an association-list containing operating system information about the file or directory named by <var path>. <var path> must be given fully; it is <i>not</i> relative to Web space in any way.

If the file exists and is accessible, the members of the returned association-list which are guaranteed to be present are:
    <table border>
      <tr>
	<td align=left><b>Member</b></td>
	<td align=left><b>Value</b></td>
	<td align=left><b>Description</b></td>
      </tr>
      ;;; <tr><td align=center colspan=3><hr></td></tr>
      <tr>
	<td align=left> <b>NAME</b></td>
	<td align=left><i>welcome.mhtml</i></td>
	<td align=left>
	  The name of the file or directory, without any of the path
	  information.
	</td>
      </tr>

      <tr>
	<td align=left><b>FULL-NAME</b></td>
	<td align=left>/www/site/docs/welcome.mhtml</td>
	<td align=left>
	  The name of the file or directory, with full path
	  information.  This should be identical to <var PATH> as
	  received by <b><code>get-file-properties</code></b>.
	</td>
      </tr>

      <tr>
	<td align=left> <b>SIZE</b> </td>
	<td align=left>2188</td>
	<td align=left>
	  The size of the file in bytes.
	</td>
      </tr>

      <tr>
	<td align=left><b>TYPE</b></td>
	<td align=left>FILE</td>
	<td align=left>
	  The <i>type</i> of the file.  This will either be
	  <b><code>FILE</code></b> or <b><code>DIRECTORY</code></b>.
	</td>
      </tr>

      <tr>
	<td align=center colspan=3>
	  <b>In addition to the above fields, the following fields appear
	  on Unix based systems.</b>
	</td>
      </tr>

      <tr>
	<td align=left><b>CREATED</b></td>
	<td align=left>6 29 96 10 3 24</td>
	<td align=left>
	  The date on which this file was created.  The value is an
	  array, with ordered values being: month, day, year, hours,
	  minutes, and seconds.
	</td>
      </tr>

      <tr>
	<td align=left><b>WRITTEN</b></td>
	<td align=left>6 29 96 10 3 24</td>
	<td align=left>
	  The date on which this file was last written.  The value is an
	  array, with ordered values being: month, day, year, hours,
	  minutes, and seconds.
	</td>
	</tr>

      <tr>
	<td align=left><b>READ</b></td>
	<td align=left>6 30 96 19 27 51</td>
	<td align=left>
	  The date on which this file was last read.  The value is an
	  array, with ordered values being: month, day, year, hours,
	  minutes, and seconds.
	</td>
      </tr>

      <tr>
	<td align=left><b>CREATOR</b></td>
	<td align=left>bfox</td>
	<td align=left>
	  The system identifier of the user who created this file.
	</td>
      </tr>
    </table>
")("KEY-ARGS" . "")("REQ-ARGS" . "path")("SECTION" . "file-operators")("FUNTYPE" . "simple")("NAME" . "get-file-properties")))("SMALL-CAPS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Modify the characters in <var body> raising lower-case
characters to upper-case, and changing the size of fonts as directed.
For example, this is how ``<small-caps lower=-1>Hello
There</small-caps>'' can be produced:

<example>
  <small-caps lower=-1>Hello There</small-caps>
</example>
")("KEY-ARGS"  "upper=size" "lower=size" "other=size")("REQ-ARGS" . "")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "small-caps")))("ODBC::DATABASE-COLUMNS-INFO" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . " Returns an array of alists of properties of the columns of a table. 

An example of one entry in the result array:

((NAME . \"realname\")(LENGTH . \"30\")(TYPE . \"GSQL_CHAR\")(IS_UNIQUE . \"\")(IS_NULLABLE . \"true\")(QUALIFIER . \"\")(OWNER . \"\")(TYPENAME . \"\")(PRECISION . \"0\")(SCALE . \"0\")(RADIX . \"0\")(TABLE . \"accounts\"))

    ")("KEY-ARGS" . "result=var")("REQ-ARGS"  "dbvar" "table")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-columns-info")))("PACKAGE-NAMES" (("OPT-ARGS" . "")("SHORT-DESC" . "Returns a newline separated list of the all of the named packages which are currently defined.  Because the list is newline separated, the result can easily be assigned to an array variable:

<example>
  <set-var all-packages[]=<package-names>>
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "packages")("FUNTYPE" . "simple")("NAME" . "package-names")))("STREAM-SHUTDOWN" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Only for use with network streams, this tells the underlying operating system (and the other end of the network connection) that no additional input or output will be done using this object.  In effect, it immediately closes the stream.

When used in conjunction with <code>*standard-output*</code>, this can be used to close the HTTP connection to the client, and yet continue processing data.
")("KEY-ARGS" . "")("REQ-ARGS" . "stream")("SECTION" . "stream-operators")("FUNTYPE" . "simple")("NAME" . "stream-shutdown")))("DATABASE-QUERY" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Select records from the database referenced by <var dbvar>, based on <var expr>, perhaps sorting them based on the data in <var FIELD>s, and optionally formatting them with the <Meta-HTML> expression in <var fexpr>.

Both <var expr> and <var fexpr> are evaluated with the fields of the database as the current package, so references to variables which are not part of the record structure must be fully qualified (i.e., by prefixing them with a package name. See <secref Packages> for more information.) If the result of evaluating <var expr> is not the empty string, then the record is selected for further processing by either <var format>, <var keys>, or to be returned in a  plain text list of keys.

The order of evaluation is as follows:

First, the database is queried, and an internal list of selected records is created.  Then, if <var sort=field1,field2...> is present, the records are sorted using the values of the specified fields.  The order of the sort can be reversed by passed <var sortorder=reverse>.

Next, if <var format=fexpr> is present, <var fexpr> is executed for each record, in an environment where the current package consists of bindings for each field's name to each field's value, and the special binding of <code>key</code> to the key of that record.  Finally, if <var keys=varname> is present, <var varname> is the name of a variable into which the matched keys are stored as an array.

The <var sort> parameters indicates which fields to sort the resultant keys on; the field names <var field1,field2...> are separated by commas.

Examples:

This simple query stores the key of every record in the database whose <b>name</b> field contains \"Fox\" into the variable named <b>dbkeys</b>:

<example>
<with-open-database db \"/www/data/employee.db\" mode=read>
  <database-query db <match <get-var name> \"Fox\"> keys=dbkeys>
</with-open-database>
</example>

This more complex query formats an alphabetical list of all the members of the database who are employed as carpenters, and are between the ages of 20 and 45, by creating links to a page which will (presumably) get a more detailed listing of the individual record:

<example>
<with-open-database db \"employee.db\" mode=read>
  <database-query db sort=LastName
    <and <match <get-var job> \"carpent\">
         <gt age 20>
         <lt age 45>>
    format = <prog
               <a href=\"detail-display.mhtml?<cgi-encode key>\">
               <get-var LastName>, <get-var FirstName>
               </a>: <get-var Job>, <get-var Age>>>
</with-open-database>
</example>
")("KEY-ARGS"  "format=fexpr" "keys=varname" "sort=field1[" "field2...]" "sortorder=reverse")("REQ-ARGS"  "dbvar" "expr")("SECTION" . "database-commands")("FUNTYPE" . "simple")("NAME" . "database-query")))("ODBC::DATABASE-EXEC-QUERY" (("OPT-ARGS" . "cursor=varname")("KEYWORDS" . "SQL query")("SHORT-DESC" . "Executes the SQL query in <var query-string> The <var query-string> can be any expression <meta-html> expression which evaluates to
a valid SQL query or command string.

Returns a cursor object, which can be passed to 
<funref odbc-database-extensions odbc::database-next-record>, <funref odbc-database-extensions odbc::number-of-rows>, and
<funref odbc-database-extensions odbc::set-row-position>.

If the <var cursor> keyword arg is supplied, the returned cursor value is stored in the supplied variable name. ")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "query-string")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-exec-query")))("SET-VAR" (("OPT-ARGS" . "name=value...")("KEYWORDS" . "")("SHORT-DESC" . "Gives the variable <var name> the value of <var value>
for the current processing run.  Any number of name/value pairs may be given, and whitespace is not significant.  Where <var =VALUE> is omitted, the value is the empty string.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "set-var")))("MSQL::SET-ROW-POSITION" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Sets the current row number position in the result referenced by <var cursorvar> to <var index>.

Subsequent calls to <example code><msql::database-next-record></example> will begin with the record at <var index>.
")("KEY-ARGS" . "")("REQ-ARGS"  "cursorvar" "index")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::set-row-position")))("%%WRITE-PACKAGE-FILE" (("OPT-ARGS" . "package-name...")("KEYWORDS" . "binary; storage; storing package files")("SHORT-DESC" . "Writes the binary representation of the packages specified by <var package-name>s to the file specified by <var filename>.

Returns the number of packages written.

The packages may be read back in with <funref packages %%read-package-file>.  This command is used in the <code>mklib</code> program in the <meta-html> distribution.
")("KEY-ARGS" . "")("REQ-ARGS" . "filename")("SECTION" . "packages")("FUNTYPE" . "simple")("NAME" . "%%write-package-file")))("MHTTPD::ADMIN-ROOT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "MHTTPD::ADMIN-ROOT is the complete path to the directory which contains server administration pages.  Usually set to <code>\".../conf/admin\"</code>.

<complete-example>
    <get-var mhttpd::admin-root>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhttpd::admin-root")))("MSQL::DATABASE-LOAD-RECORD" (("OPT-ARGS" . "package=packagename")("KEYWORDS" . "")("SHORT-DESC" . "Load variable values from the database referenced by <var dbvar> and <var key> into the package specified by <var packagename> (defaulting to the current package if not supplied).

<var tablename> and <var fieldname> must be supplied -- they specify the table and primary key field to be operated on.
")("KEY-ARGS"  "table=tablename" "keyname=fieldname")("REQ-ARGS"  "dbvar" "key")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-load-record")))("MHTML::RELATIVE-PREFIX" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The sub-portion of the document path which appears after <varref mhtml::include-prefix>.

If the document path was:

<i><get-var mhtml::location></i>

then the value of <code>mhtml::relative-prefix</code> is:

<i><get-var mhtml::relative-prefix></i>

Useful when constructing new URLs based on the current URL.

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::relative-prefix")))("ODBC::DATABASE-QUERY-INFO" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "  Returns an array of alists of information about the columns of the
   given cursor's query result set.

This is similar to the format returned by 
database-columns-info. Example:
<example>
((NAME . \"realname\")(LENGTH . \"30\")(TYPE . \"GSQL_CHAR\")(IS_UNIQUE . \"\")(IS_NULLABLE . \"true\")
(QUALIFIER . \"\")(OWNER . \"\")(TYPENAME . \"\")(PRECISION . \"0\")(SCALE . \"0\")(RADIX . \"0\")(TABLE . \"accounts\"))
</example>
")("KEY-ARGS" . "result=varname")("REQ-ARGS" . "cursor")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-query-info")))("MOD" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "  Returns the remainder of <var arg1> and <var arg2>.

  <example>
    <mod 12 2> --> 0
    <mod 10 3> --> 1
  </example>
")("KEY-ARGS" . "")("REQ-ARGS"  "arg1" "arg2")("SECTION" . "arithmetic-operators")("FUNTYPE" . "simple")("NAME" . "mod")))("SESSION-IMPORT" (("OPT-ARGS" . "to-package")("KEYWORDS" . "")("SHORT-DESC" . "Get the values of the session variables which belong to <var PACKAGE> and set their values in the current package. If <var TO-PACKAGE> is supplied, it is the name of the package which will receive the variable values. Thus, if the session data for the current session contains:

<example code>((BLUE::FOO . bar))</example>

and then at a later time in the same session the command:

<example code><session-import blue></example>

is given, then the variable <code>FOO</code> in the current package will be set to <code>bar</code>.  This is extremely useful when bouncing back and forth between forms, see <funref sessions session-export>.
")("KEY-ARGS" . "")("REQ-ARGS" . "package")("SECTION" . "session-operators")("FUNTYPE" . "simple")("NAME" . "session-import")))("PLAIN-TEXT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Performs the following steps:

<ol>
  <li> Replace occurrences of pairs of newline characters with a
  single <example code><P></example> tag.

  <li> Applies the function <var expr> to the first character of every
  paragraph, and inserts the closing tag after that character.
</ol>

The output will start with a <example code><P></example> tag, unless the
optional argument <var nobr=true> is given.

<complete-example>
<plain-text first-char=<font size=\"+1\"> nobr=true>
  This is line 1.

  This is line 2.
</plain-text>
</complete-example>

")("KEY-ARGS"  "first-char=expr" "nobr=true")("REQ-ARGS" . "")("SECTION" . "string-operators")("FUNTYPE" . "complex")("NAME" . "plain-text")))("ODBC::DATABASE-SAVE-PACKAGE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Save the variables in <var package> associated with the value <var key> in column <var keyname> in the table <var tablename> of the database referenced by <var dbvar>.

This only saves variables which have names matching existing table fields. Package prefixes are stripped from the
variables, and the symbol name is used as the column
name to store the data. Symbol names and column names
are treated in a case-insensitive manner.

<funref msql::database-save-package> is implemented to
first attempt to do a SQL INSERT into the table, and if
that fails to try a UPDATE query, with <var keyname> = <var key>.

Example: Say we want to save  some information about employee Kate Mulgrew, in a table of employees, which
has a primary key field named \"id\", and we want to
save this record with id=103:

<example>



 <set-var baz::name=\"Kate Mulgrew\" baz::age=45 baz::salary=34000 
    baz::dept=travel>
  
  <set-var result=<odbc::database-save-package mydb 103 baz
					       table=employees keyname=id>>
</example>



If a variable in the package you are saving corresponds
to a column with a numeric field type, and the value of the variable is the empty string, the system will attempt to store
a NULL value into this field of the record. If the table
does not support NULL values on that column, the operation will fail.")("KEY-ARGS"  "keyname=fieldname" "table=tablename")("REQ-ARGS"  "dbvar" "key" "package")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-save-package")))("MHTML::REMOTE-IDENT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The value of the environment variable <varref ENV::REMOTE_IDENT> as received by the server.

In the <meta-html> server, you can turn on the feature of asking the connecting host for the username of the individual running the client browser by setting <varref MHTTPD::GET-REMOTE-IDENT>.

There is never any gaurantee that the client will allow the server to find this information out, so you should not write code which relies on the presence of this variable.  However, if it is present, it can be useful to present a default value.  For example:

<example>
   <when <not <get-var e-mail>>>
     <set-var e-mail = <get-var mhtml::remote-ident>>
   </when>
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "variables")("FUNTYPE" . "variable")("NAME" . "mhtml::remote-ident")))("ODBC::DATABASE-TABLE-FIELDS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "List all the fieldnames for a table. This must be done with a database already open, i.e., within the scope of a <funref odbc-database-interface odbc::with-open-database>.

Returns an array of column names, or sets the value of <var varname> if supplied.
")("KEY-ARGS" . "result=varname")("REQ-ARGS"  "dbvar" "tablename")("SECTION" . "odbc-database-extensions")("FUNTYPE" . "simple")("NAME" . "odbc::database-table-fields")))("MHTML::LOCATION" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The URL used to connect to the current document, including path information and query strings, but without the protocol or host information.

<complete-example>
<get-var mhtml::location>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::location")))("MHTML::MHTTPD-PAGES" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "MHTML::MHTTPD-PAGES is the directory containing various pages used by the server for displaying error conditions, directory files, etc.  This is a complete path to the directory, without the trailing slash.

<complete-example>
   <get-var mhtml::mhttpd-pages>
</complete-example>

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::mhttpd-pages")))("MSQL::DATABASE-NEXT-RECORD" (("OPT-ARGS"  "colnames=namelist" "prefixtablenames")("KEYWORDS" . "")("SHORT-DESC" . "Fill the variables in <var packagename> (defaulting to the current package if not supplied) with the values of the next record which last satisfied the search referenced by <var cursorvar>.

Each subsequent call gets a subsequent record from the list of results, until all of the results are exhausted.

Returns \"true\" if there are any records left in the search results, or the empty string if not.

 If <var colnames> is supplied, then the column values of this result  are bound
   sequentially to these commas-separated list of names instead of the field names in the
   result set.

<example>
<msql::database-next-record mydb cursor package=tmp
                colnames=\"a.name, a.partnum, b.name\">
<get-var tmp::b.name>
<get-var tmp::a.name>
</example>

If <prefixtablenames> is non-null, or the database connection option SQL-PREFIX-TABLENAMES is non-null, then for each column in the result set, use the column's table name, if it exists, as a prefix to the column name as the variable name.
")("KEY-ARGS" . "package=packagename")("REQ-ARGS" . "cursorvar")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-next-record")))("MHTML::PROLOGUE-DOCUMENT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "MHTML::PROLOGUE-DOCUMENT is a per-connection file of code to be run just before processing any Meta-HTML document.

<complete-example>
    <get-var mhtml::prologue-document>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::prologue-document")))("ENV::HTTP_AUTHORIZATION" (("OPT-ARGS" . "")("KEYWORDS" . "environment;")("SHORT-DESC" . "The <code>Basic Authorization</code> string, as received by the server.  By the time that you see this string, the user has already been authorized.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "env::http_authorization")))("PACKAGE-VARS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns a newline separated list of the fully qualified variable names found in the package named by <var package-name>.  When <var strip=true> is supplied, the returned variable names have the package prefix stripped off, making them <i>not</i> fully qualified.  The names are not returned in any significant order.  Because the list is  newline separated, the results can easily be assigned to an array variable:

<complete-example>
<set-var foo::bar=baz>
<set-var foo::baz=bar>
<set-var names[]=<package-vars foo>>
<get-var names[1]>
</complete-example>
")("KEY-ARGS" . "strip=true")("REQ-ARGS" . "package-name")("SECTION" . "packages")("FUNTYPE" . "simple")("NAME" . "package-vars")))("REDIRECT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Immediately return the HTTP <b>Location</b> directive with <var url>.  This command is extremely useful in conjunction with <funref variables var-case>; in effect, that usage creates a dispatch table.")("KEY-ARGS" . "")("REQ-ARGS" . "url")("SECTION" . "flow-control")("FUNTYPE" . "simple")("NAME" . "redirect")))("MHTML::RAW-CONTENT-DATA" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Contains <i>exactly</i> what the client browser sent in its <code>POST</code> request.

For wizard's use only!
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::raw-content-data")))("ODBC::SET-CONNECT-OPTION" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Performs ODBC SQLSetConnectOption call.  Returns the requested
data value specified by <var fInfoType>

Valid values for <var fInfoType> are:

<example>
SQL_ACCESS_MODE  	
SQL_AUTOCOMMIT		
SQL_LOGIN_TIMEOUT 	
SQL_OPT_TRACE 		
SQL_OPT_TRACEFILE 	
SQL_TRANSLATE_DLL 	
SQL_TRANSLATE_OPTION 	
SQL_TXN_ISOLATION 	
SQL_CURRENT_QUALIFIER 	
SQL_ODBC_CURSORS	
SQL_QUIET_MODE 		
SQL_PACKET_SIZE 	
</example>




")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "fInfoType" "value")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::set-connect-option")))("ODBC::DATABASE-FIELD-INFO" (("OPT-ARGS" . "")("KEYWORDS" . "SQL information database")("SHORT-DESC" . "Returns an alist of properties of the specified column  <var fieldname> in the SQL table named <var table>:

<example>
((name . \"column_name\") (length . \"max byte length\") (type . \"sqlDatatype\")
    (is_primary_key . \"true\") (is_not_null . \"true\"))
</example>

The returned sqlDatatype value is one of
<pre>
GSQL_CHAR
GSQL_NUMERIC
GSQL_DECIMAL
GSQL_INTEGER
GSQL_SMALLINT
GSQL_FLOAT
GSQL_REAL
GSQL_DOUBLE
GSQL_VARCHAR
</pre>
")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "table" "fieldname")("SECTION" . "odbc-database-extensions")("FUNTYPE" . "simple")("NAME" . "odbc::database-field-info")))("PID" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns the current process ID on those systems which have process ID's.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "pid")))("SERVER-PUSH" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "This command will be made obsolete.

Its functionality is available other, cleaner ways, specifically through the use of <funref stream-operators with-open-stream> and the variable <varref *standard-output*>.

Just write it as a <funref \"macro-commands\" defmacro>.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "flow-control")("FUNTYPE" . "complex")("NAME" . "server-push")))("SESSIONS-OF-KEY" (("OPT-ARGS" . "key")("KEYWORDS" . "")("SHORT-DESC" . "Returns a newline separated list of the session ID's whose key matches
<var key>.  If <var key> is not specified, or if it contains only
whitespace, all session ID's in the session database are returned.
Since the list is newline separated, it is suitable for assignment to
an array, as in:

<example>
  <set-var sids[]=<sessions-of-key \"On-Line Shopping\">>
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "session-operators")("FUNTYPE" . "simple")("NAME" . "sessions-of-key")))("MHTML::EPILOGUE-DOCUMENT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Specifies a per-connection file of code to be appended to the page just before processing any Meta-HTML document.

<complete-example>
   <get-var mhtml::epilogue-document>
</complete-example>

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::epilogue-document")))("SESSION-EXPORT" (("OPT-ARGS" . "to-package")("KEYWORDS" . "")("SHORT-DESC" . "Save the package variables of <var package> in the current session.  If <var to-package> is supplied, it indicates a new  package name to assign to each variable from <var package> that is saved.

This function is quite useful when you wish to save all of the variables that were <b>posted</b> from the previous  URL (presumably, that URL contained a form whose <b>action</b> pointed to the current URL) in the session database record for the current session.  For example, if the previous URL posted the variables <code>FOO</code> and <code>BAR</code>, then executing

<example code><session-export posted blue></example>

results in the session database containing values for
<code>blue::FOO</code> and <code>blue::BAR</code>.  These values can either be looked up directly, or retrieved as a group (see <funref session-operators session-import> for more information).
")("KEY-ARGS" . "")("REQ-ARGS" . "package")("SECTION" . "session-operators")("FUNTYPE" . "simple")("NAME" . "session-export")))("DEFINE-CONTAINER" (("OPT-ARGS" . "named-parameter...")("KEYWORDS" . "")("SHORT-DESC" . "Define <var name> as a complex tag. At invocation time, various substitutions are made within <var body>.
Specifically, if the text string is:

<ul>
  <li><b>%0</b>,<b>%1</b>, and so on, upto <b>%9</b> are replaced
  with the exact text of the positional arguments that were found in
  the opening tag of the invocation

   <li><b>%attributes</b> is replaced by all of the arguments which appeared in the
  opening tag.

 <li><b>%body</b> is replaced with the exact text of the material
  that appeared between the opening and closing tags

  <li><b>%qbody</b> is similar to <b>%body</b>, but the string is
  first surrounded by double quotes, and double quote characters which
  appear in the string are escaped.

  <li><b>%xbody</b> is replaced with the evaluation of the material
  that appeared between the opening and closing tags
</ul>

If any <var named-parameter>s are supplied, the values that were passed in the opening tag are evaluated and bound to the named parameters.

A keyword argument of <var package-name> wraps the entire body of the macro in an <funref packages in-package> statement.

The keyword argument <var whitespace> can be set to the string <code>delete</code> to remove whitespace from the starts and ends of lines in the macro definition before it is stored.  This effectively concatenates all of the lines of the macro definition into a single long line.
")("KEY-ARGS"  "package=package-name" "whitespace=delete")("REQ-ARGS" . "name")("SECTION" . "macro-commands")("FUNTYPE" . "complex")("NAME" . "define-container")))("ARRAY-SHIFT" (("OPT-ARGS" . "")("KEYWORDS" . "arrays")("SHORT-DESC" . "Shift the elements of <var arrayvar> the indicated amount.

If <var amount> is negative, the elements are shifted down (i.e. towards zero), with the lowest number elements being lost.

If <var amount> is positive, the elements are shifted up, with no loss at all -- instead empty elements are used to fill the created space.

Given the array:
<example>
<set-var array[] =
   <prog
       0
       1
       2>>
</example>

<set-var array[] =
   <prog
       0
       1
       2>>

then after executing <example code><array-shift 2 array></example>, the array looks like:
<example>
   \"\"
   \"\"
   \"0\"
   \"1\"
   \"2\"
</example>
and, a subsequent execution of <example code><array-shift -3 array></example> leaves <var array>:
<example>
   \"1\"
   \"2\"
</example>
")("KEY-ARGS" . "")("REQ-ARGS"  "amount" "arrayvar")("SECTION" . "arrays")("FUNTYPE" . "simple")("NAME" . "array-shift")))("MSQL::CURSOR-GET-COLUMN" (("OPT-ARGS" . "")("KEYWORDS" . "SQL query ")("SHORT-DESC" . "This can be called with  a cursor which is the result from a call to database-exec-query.

It gets the data  from the current result set, in column numbered <var column-number> (starting at column 0).
")("KEY-ARGS" . "")("REQ-ARGS"  "cursor" "column-number")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::cursor-get-column")))("CGI-EXEC" (("OPT-ARGS"  "arg1" "..." "argn")("KEYWORDS" . "")("SHORT-DESC" . "Execute the system function named by <var path>, perhaps passing it arguments <var arg1 ... argn>.

If <var output=varname> is supplied, then <var varname> receives the output of the command.  Otherwise, the resultant output is placed in the page.

If <var errors=varname> is supplied, then <var varname> receives the error output of the command. Otherwise, the resultant output is placed in <funref language-operators SYSTEM-ERROR-OUTPUT>.
")("KEY-ARGS"  "output=varname" "errors=varname")("REQ-ARGS" . "pathname")("SECTION" . "file-operators")("FUNTYPE" . "simple")("NAME" . "cgi-exec")))("SUBSTRING" (("OPT-ARGS" . "end")("KEYWORDS" . "")("SHORT-DESC" . "Extracts the substring of <var string> whose first character starts at offset <var start>, and whose last character ends at offset <var end>. The indexing is zero-based, so that:

<example>
  <substring \"Hello\" 1 2> --> \"e\"
</example>

This function is useful when you know in advance which part of the string you would like to extract, and do not need the pattern matching facilities of <funref strings match>.
")("KEY-ARGS" . "")("REQ-ARGS"  "string" "start")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "substring")))("ODBC::SQL-TRANSACT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "  Perform transaction, to either commit or rollback all operations on
   the current database connection.

   ACTION can be one of COMMIT or ROLLBACK. 
   If unspecified, ACTION defaults to COMMIT.

NOTE: ODBC connections default to AUTOCOMMIT mode. See
<funref odbc::set-connect-option> and <funref odbc::get-connect-optin>.")("KEY-ARGS" . "action=COMMIT|ROLLBACK")("REQ-ARGS" . "dbvar")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::sql-transact")))("DECRYPT" (("OPT-ARGS" . "")("KEYWORDS" . "security; encryption; decryption; password")("SHORT-DESC" . "Decrypts the contents of the previously encrypted variable named by <var varname> using <var password>.

The contents of <var varname> are modified -- this function has no return value.

This function only does something if Meta-HTML has been configured with the <code> --with-des</code> option, currently only available to those sites which are physically located within the United States.

Also see <funref variables encrypt>.
")("KEY-ARGS" . "")("REQ-ARGS"  "varname" "password")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "decrypt")))("ODBC::DATABASE-QUERY" (("OPT-ARGS"  "colnames=namelist" "prefixtablenames")("KEYWORDS" . "SQL query ")("SHORT-DESC" . "Select and optionally format records in the database <var db> according to the criterion in <var fexpr>. 

<var query> is an SQL query, which returns a list of
rows.

For each result row, <var expr> is then evaluated, with the  column values of each row bound to their corresponding column name.  If the result of that evaluation is not an empty string, then that record is selected for further processing by either <var format>, <var keys>, or to return in plain text the list of keys. If <var format> is present, it is an expression to evaluate in the context of the database fields, (as with <var expr>).

The example below shows an SQL query which is formatted as
rows of an HTML table. In this case, the <var expr> is simply the constant true, and all of the selection of 
records is done via the SQL query itself. The <var expr> could be used to impose additional conditions to decide whether to invoke the format expression on a row.


<example>
  <odbc::with-open-database rdb database=rolodex
			    host=localhost>
  <table border=1>
    <tr><th>Name</th><th>Age</th></tr>
  <odbc::database-query rdb true 
			query=\"SELECT * FROM people WHERE name like 'Washington' ORDER BY lastname\"
			format=<prog <tr>
				 <td>
				 <get-var lastname>, <get-var firstname>
				 </td>
				 <td>
				 <get-var age>
				 </td>
				 </tr>>>
    </table>
  </odbc::with-open-database>
</example>


If <var keys> is specified, it is the simple name of a variable to receive the array of keys which satisfied <var fexpr>. If you specify an argument for <var keys>, you must
also specify which column to collect the values from, using
the <var keyname> keyword argument.

If the optional argument <var colnames> is supplied, then for each row, column values are bound sequentially to these comma-separated names instead of the column names in the result set.

<example>
<odbc::database-query mydb true query=<get-var query>
                      colnames=\"foo.name, bar.name\"
                      format=<prog FOO.NAME IS 
				<get-var foo.name> 
				BAR.NAME IS 
				<get-var bar.name>>>
</example>

If <var prefixtablenames> is non-null, or the database
connection option SQL-PREFIX-TABLENAMES is
  non-null, then for each column in the result set, use the column's table
   name, if it exists, as a prefix to the column name as the variable
   name.")("KEY-ARGS"  "query=query-string" "format=fexpr" "keys=varname" "keyname=fieldname")("REQ-ARGS"  "dbvar" "expr" "query")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-query")))("DBM::GET-VAR" (("OPT-ARGS" . "")("KEYWORDS" . "dbm;db;ndbm;gdbm; perl database")("SHORT-DESC" . "Returns the value associated with <var varname> in the open database referenced by <var dbvar>.
")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "varname")("SECTION" . "direct-dbm-access")("FUNTYPE" . "simple")("NAME" . "dbm::get-var")))("ENV::REMOTE_HOST" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The host name of the connecting client.  In cases where the connecting client does not have a host name which can be looked up by the use of DNS, this variable contains the host's Internet Protocol address, in \"dot\" notation.

<complete-example>
    <get-var env::remote_host>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "language-operators")("FUNTYPE" . "variable")("NAME" . "env::remote_host")))("ODBC::QUERY-GET-COLUMN" (("OPT-ARGS" . "")("KEYWORDS" . "SQL query ")("SHORT-DESC" . "This can be only  be called within the scope of the  odbc::database-query function.

It gets the data from the current result set, in column numbered <var column-number> (starting at column 0).
")("KEY-ARGS" . "")("REQ-ARGS" . "column-number")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::query-get-column")))("DATABASE-UNIQUE-KEY" (("OPT-ARGS" . "suggestion")("KEYWORDS" . "")("SHORT-DESC" . "Return a key which is guaranteed to not already exist in the the database referenced by <var db>.  If <var suggestion> is supplied, that key is tried first, and then subsequent attempts are various modifications to the suggestion.
")("KEY-ARGS" . "")("REQ-ARGS" . "dbvar")("SECTION" . "database-commands")("FUNTYPE" . "simple")("NAME" . "database-unique-key")))("ODBC::NUMBER-OF-ROWS" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns the number of rows which were found as a result of the last query issued for <var cursorvar>.

Cursors are created as the result of direct SQL queries by <funref odbc-database-interface odbc::database-exec-query>.
")("KEY-ARGS" . "")("REQ-ARGS" . "cursorvar")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::number-of-rows")))("MSQL::HOST-DATABASES" (("OPT-ARGS" . "hostname")("KEYWORDS" . "")("SHORT-DESC" . "Return the names of the databases available on <var host> as a newline separated list of strings.  If <var varname> is supplied, it is the name of a variable which should receive the values.
")("KEY-ARGS" . "result=varname")("REQ-ARGS" . "")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::host-databases")))("MHTML::CGI-DIRECTORIES" (("OPT-ARGS" . "")("KEYWORDS" . "server variables; cgi; cgi-path")("SHORT-DESC" . "This array is a list of physical paths relative to the document root which are directories containing CGI programs.

The paths are checked <i>after</i> path translation has been performed.  The final slash for each directory must be specified.

<example>
   <get-var mhtml::cgi-directories[0]> --> /cgi-bin/
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::cgi-directories")))("GET-VAR" (("OPT-ARGS" . "name...")("KEYWORDS" . "")("SHORT-DESC" . "Returns (as a text string) the current value of the variables named by
the <var name>s given.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "get-var")))("STREAM-GET" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Reads a chunk of data from <var stream> and returns it.  <var stream>
is read until the character value specified by <var character>
(defaulting to a newline) is reached, and that data upto and including
the final <var character> is returned.  One way to read all of the
available data is to supply the empty string as the value of
<var stop-at>:

<example>
  <with-open-stream stream www.ua.com:80 type=tcp mode=read-write>
    <stream-put stream \"GET /welcome.mhtml HTTP/1.0\\n\\n\">
    <set-var the-page=<stream-get stream stop-at=\"\">>
  </with-open-stream>
</example>
")("KEY-ARGS" . "stop-at=character")("REQ-ARGS" . "stream")("SECTION" . "stream-operators")("FUNTYPE" . "simple")("NAME" . "stream-get")))("FUNCTION-DEF" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Returns the Meta-HTML readable form of the function body stored in the user-defined function <var name>.

User-defined functions are made using <funref macros defmacro>, <funref macros defsubst>, or <funref macros defun>.
")("KEY-ARGS" . "")("REQ-ARGS" . "name")("SECTION" . "macro-commands")("FUNTYPE" . "simple")("NAME" . "function-def")))("MSQL::DATABASE-FIELD-INFO" (("OPT-ARGS" . "")("KEYWORDS" . "SQL information database")("SHORT-DESC" . "Returns an alist of properties of the specified column  <var fieldname> in the SQL table named <var table>:

<example>
((name . \"column_name\") (length . \"max byte length\") (type . \"sqlDatatype\")
    (is_primary_key . \"true\") (is_not_null . \"true\"))
</example>

The returned sqlDatatype value is one of
<pre>
GSQL_CHAR
GSQL_NUMERIC
GSQL_DECIMAL
GSQL_INTEGER
GSQL_SMALLINT
GSQL_FLOAT
GSQL_REAL
GSQL_DOUBLE
GSQL_VARCHAR
</pre>
")("KEY-ARGS" . "")("REQ-ARGS"  "dbvar" "table" "fieldname")("SECTION" . "msql-database-extensions")("FUNTYPE" . "simple")("NAME" . "msql::database-field-info")))("WITH-OPEN-DATABASE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Create an environment in which other database commands can be given.  First, the database referenced by <var dbname> is locked and opened in the mode specified by <var open-mode>, and the resultant database handle is bound to the variable named by <var dbvar>.  Then, the <var body> code is executed.  Finally, the database is closed, and further references to <var dbvar> are meaningless.

Please note that the file name specified by <var dbname> should be a full pathname; it is not relative to Web space in any way.

<var open-mode> should evaluate to one of the following:

<ul>
  <li> <var reader><br>
The caller wishes only to have read access to the specified database.

<li> <var writer><br>
The caller wishes to have both read and write access to the specified database.

<li> <var write-create><br>
The caller wishes both read and write access to the specified database.  If the database does not exist, it is created.
</ul>
")("KEY-ARGS" . "mode=open-mode")("REQ-ARGS"  "dbvar" "dbname")("SECTION" . "database-commands")("FUNTYPE" . "complex")("NAME" . "with-open-database")))("SORT" (("OPT-ARGS" . "sort-fun")("KEYWORDS" . "sort; arrays")("SHORT-DESC" . "Sort the contents of the array <var arrayvar>.

The elements are sorted in place -- this function has no return value.

If <var caseless=true> is given, then the comparison of the elements of the array is done without regards to case.

If <var sortorder=reverse> is given, then the results are returned in descending order, instead of ascending order.  The default is to order the elements in ascending order.

If <var numeric=true> is given, then the elements of <var arrayvar> are treated as numeric entities, whether they are or not.  The default is to treat the elements as character strings, which can have unexpected results when sorting numeric quantities (\"11\" is less then \"2\" when sorting alphabetically!)

Finally, you may supply a sorting function, whose name is passed as <var sort-fun>.  This function will be called on each element just before comparison, and the results of that function will be used for the comparison instead of the element itself.  This allows you to create a collating sort, or to sort on complex weighting features, or anything else that you can conceive of.

Examples:

Given the array:
<set-var array[0] = 1
         array[1] = 2
         array[3] = 3
         array[4] = 4
         array[5] = 20>
<example>
<set-var array[0] = 1
         array[1] = 2
         array[3] = 3
         array[4] = 4
         array[5] = 20>
</example>
then,

<complete-example>
<sort array>
<foreach x array> <get-var x> </foreach>
</complete-example>
while
<complete-example>
<sort array numeric=true>
<foreach x array> <get-var x> </foreach>
</complete-example>

Sorting strings:
<complete-example>
<set-var array[]=\"a\\nb\\nc\\nd\\ne\\nf\\nA\\nB\\nC\\nD\\nE\\nF\">
<sort array sortorder=descending>
<foreach x array> <get-var x> </foreach>
</complete-example>

Without regards to case:
<complete-example>
<sort array caseless=true>
<foreach x array> <get-var x> </foreach>
</complete-example>

Finally, here is an example which sorts a list
of words based upon the percentage of vowels
present in each word, using a sort function
which calculates that value for each string:

<complete-example>
<defun vowel-percentage string>
  <set-var x =
    <subst-in-string <downcase <get-var string>> \"([^aeiou])\" \"\">>
  <percent <string-length <get-var x>>
           <string-length <get-var string>>>
</defun>
.blank
<set-var words[]=
  <prog
    Brian
    Fox
    sorts
    elegant
    strings
    beautifully>>
.blank
<sort words vowel-percentage numeric=true sortorder=descending>
.blank
<foreach word words>
  <get-var word> (<vowel-percentage <get-var word>>)<br>
</foreach>
</complete-example>
")("KEY-ARGS"  "caseless=true" "sortorder=reverse" "numeric=true")("REQ-ARGS" . "arrayvar")("SECTION" . "arrays")("FUNTYPE" . "simple")("NAME" . "sort")))("MHTML::URL-TO-DIR" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The complete URL to the directory containing the current document.  This includes protocol, host, session ID, and relative prefix information.

<complete-example>
<get-var mhtml::url-to-dir>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::url-to-dir")))("DBM::SET-VAR" (("OPT-ARGS" . "name=value...")("KEYWORDS" . "dbm;ndbm;gdbm;perl database")("SHORT-DESC" . "Sets the association for <var name> to be <var value> in the open database referenced by <var dbvar>.  Multiple <var name=value> pairs may be given.
")("KEY-ARGS" . "")("REQ-ARGS" . "dbvar")("SECTION" . "direct-dbm-access")("FUNTYPE" . "simple")("NAME" . "dbm::set-var")))("DATABASE-SAVE-RECORD" (("OPT-ARGS" . "var1...varn")("KEYWORDS" . "")("SHORT-DESC" . "Save the variables <var var1...varn> in the database referenced by <var dbvar> in the record specified by the key <var key>.  If <var package-name> is supplied, then the names of the variables written to the database are written as if they belonged to that package.

Upon success, this function returns the string <code>\"true\"</code>.

Also see <funref database-commands database-save-package>, and
<funref database-commands database-load-record>.

<example>
<with-open-database db /tmp/file.db mode=write-create>
  <set-var saved? =
     <database-save-record db <get-var name> name age size>>
</with-open-database>

<when <get-var saved?>>
  The record was stored successfully.
</when>
</example>
")("KEY-ARGS" . "package=package-name")("REQ-ARGS"  "dbvar" "key")("SECTION" . "database-commands")("FUNTYPE" . "simple")("NAME" . "database-save-record")))("MHTTPD::ADMIN-PORT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "MHTTPD::ADMIN-PORT is the port number on which the <meta-html> server should listen for administration requests.  The default port is generally set to 8008.

If no such port is specified, then the server will not listen for administration requests at all.

<complete-example>
    <get-var mhttpd::admin-port>
</complete-example>

")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhttpd::admin-port")))("DIRECTORY-CONTENTS" (("OPT-ARGS" . "package-name")("KEYWORDS" . "")("SHORT-DESC" . "Returns a newline separated list of association lists for
the files matching <var pattern>.

When <var package-name> is supplied, each variable in
<var package-name> is the name of a file in <var path>, and
the value of each variable is the association list for that
file.")("KEY-ARGS" . "matching=pattern")("REQ-ARGS" . "path")("SECTION" . "file-operators")("FUNTYPE" . "simple")("NAME" . "directory-contents")))("MSQL::WITH-OPEN-DATABASE" (("OPT-ARGS" . "dsn=DSN")("KEYWORDS" . "")("SHORT-DESC" . "Create an environment in which other MSQL database commands can be given.  First, the database referenced by <var dbname> is locked and opened, and the resultant database handle is bound to the variable named by <var dbvar>.  Then, the <var body> code is executed.  Finally, the database is closed, and further references to <var dbvar> are meaningless.

Example:
<example>
 <msql::with-open-database rdb database=rolodex
			    host=localhost>
...
</msql::with-open-database>
</example>

For compatibility with ODBC, the host/database information
can optionally be given in a ODBC style DSN string. <example>DSN=\"host=localhost;database=rolodex\"</example>


")("KEY-ARGS"  "database=DBNAME" "host=hostname")("REQ-ARGS" . "dbvar")("SECTION" . "msql-database-extensions")("FUNTYPE" . "complex")("NAME" . "msql::with-open-database")))("PROG" (("OPT-ARGS" . "")("KEYWORDS" . "grouping; combining; multiple statements")("SHORT-DESC" . "Combine all of the material passed into a single <meta-html> statement.  This is the primitive for grouping multiple statements where only a single statement is expected.

For example:

<example>
<if <eq this that>
   <prog <h2> This is equal to That </h2>>
  <prog <h2> This is not equal to That </h2>>>

</example>

Although <code>prog</code> is a primitive in <meta-html>, it could have been defined as:

<example>
<defsubst prog>%body</defsubst>
</example>

")("KEY-ARGS" . "")("REQ-ARGS" . "code...")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "prog")))("WITH-LOCKED-SESSION" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Executes <var body> in an environment where access to the current session is blocked.  This allows concurrency (such as might be required when multiple <code>GET</code>s are being processed for a single user) to take place without introducing any race conditions for access to the current session record of the session database.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "session-operators")("FUNTYPE" . "complex")("NAME" . "with-locked-session")))("ODBC::DATABASE-SET-OPTIONS" (("OPT-ARGS"  "SQL-ESCAPE-CHARACTER-CODE=int" "SQL-TRUNCATE-COLUMNS=boolean")("KEYWORDS" . "")("SHORT-DESC" . "Sets various database-specific options.

SQL-ESCAPE-CHARACTER-CODE sets the character which is used
to escape single quotes in strings.

If SQL-TRUNCATE-COLUMNS is non-null, then queries composed
by database-save-record and database-save-package will
have character string field data automatically truncated
to the max column width of the field being stored into, before
the query is ever sent to the SQL server.")("KEY-ARGS" . "")("REQ-ARGS" . "dbvar")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-set-options")))("INCLUDE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "    Insert the contents of the file named by <var filename> into
    the document at the point where the <code>include</code> form was
    read.  If the positional argument <var verbatim> is given, then
    the contents of the file are not executed, only inserted.  Otherwise,
    execution resumes at the point where the file was inserted.

    <var filename> can be given as an absolute pathname, or a
    relative pathname.  If the path is relative, it is considered to be
    relative to the location of the document which contains the
    <code>include</code> form.  If the path given is not relative, it is
    appended to the directory found in <b>MHTML::INCLUDE-PREFIX</b>.

    If the named file could not be found on the server, and an
    <var alt> value is given, then that value is placed into the
    page instead.
")("KEY-ARGS"  "alt=code" "verbatim")("REQ-ARGS" . "filename")("SECTION" . "file-operators")("FUNTYPE" . "simple")("NAME" . "include")))("DBM::FIRST-KEY" (("OPT-ARGS" . "")("KEYWORDS" . "dbm;ndbm;gdbm;perl database")("SHORT-DESC" . "Returns the \"first\" key in the database referenced by <var dbvar>.")("KEY-ARGS" . "")("REQ-ARGS" . "dbvar")("SECTION" . "direct-dbm-access")("FUNTYPE" . "simple")("NAME" . "dbm::first-key")))("INCREMENT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Add <var amount> (default 1) to the contents of the variable named by <var varname>.

<example>
   <set-var foo=1>
   <get-var foo> --> 1
   <increment foo>
   <get-var foo> --> 2
</example>

Also see <funref arithmetic-operators decrement>.

")("KEY-ARGS" . "by=amount")("REQ-ARGS" . "varname")("SECTION" . "arithmetic-operators")("FUNTYPE" . "simple")("NAME" . "increment")))("DATABASE-FIRST-KEY" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Return a string representing the \"first\" key found in the database referenced by <var dbvar>.  The key is suitable for input to any of the database functions which takes a key as input.  The order in which keys are returned appears random, but the return value is always a suitable argument to <funref database-commands database-next-key>.
")("KEY-ARGS" . "")("REQ-ARGS" . "dbvar")("SECTION" . "database-commands")("FUNTYPE" . "simple")("NAME" . "database-first-key")))("UNSET-VAR" (("OPT-ARGS" . "name...")("KEYWORDS" . "binding")("SHORT-DESC" . "Make <var name>s be non-existent in the page environment.")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "unset-var")))("MATCH" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Matches <var regexp> against <var string> and then performs <var action>. The default <var action> is <code>report</code>; when the expression matches the string <code>match</code> returns the text <code>true</code>.

Here are some examples:

<example>
  <match \"foobar\" \".*\">                 --> \"true\"
  <match \"foobar\" \"foo\">                --> \"true\"
  <match \"foobar\" \"foo\" action=extract> --> \"foo\"
  <match \"foobar\" \"oob\" action=delete>  --> \"far\"
  <match \"foobar\" \"oob\" action=startpos>--> \"1\"
  <match \"foobar\" \"oob\" action=endpos>  --> \"4\"
  <match \"foobar\" \"oob\" action=length>  --> \"3\"
  <match \"foobar\" \"[0-9]*\">             --> \"\"
</example>
")("KEY-ARGS" . "action=(report|delete|extract|startpos|endpos|length)")("REQ-ARGS"  "string" "regexp")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "match")))("NOT" (("OPT-ARGS" . "body")("KEYWORDS" . "")("SHORT-DESC" . "<var body> is evaluated.  If the result is the empty
string, then the string \"<b>true</b>\" is returned, otherwise, nothing
is returned.  The <var body> is simply the entire contents of the
simple tag, without the word \"not\" in it. Thus, in typical usage, one
might write:

<example>
  <when <not <get-var foo>>>
     <comment> Complain that FOO is missing. </comment>
  </when>
</example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "relational-operators")("FUNTYPE" . "simple")("NAME" . "not")))("MHTTPD::GET-REMOTE-IDENT" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "MHTTPD::GET-REMOTE-IDENT, when set, says to use the IDENT protocol to attempt to find out the username associated with the connecting browser.  This only has a minor effect on server performance, but isn't especially useful for non-Meta-HTML sites.


")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "server-variables")("FUNTYPE" . "variable")("NAME" . "mhttpd::get-remote-ident")))("MHTML::REQUIRE-LOADED" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The list of pathnames which have already been loaded through <funref file-operators require>.
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "file-operators")("FUNTYPE" . "variable")("NAME" . "mhtml::require-loaded")))("ODBC::DATABASE-DELETE-RECORD" (("OPT-ARGS" . "")("KEYWORDS" . "SQL delete")("SHORT-DESC" . "Deletes the specified record in the database referenced by <var dbvar>.  The record to delete is specified by <var key> and <var keyname>. An SQL DELETE query is issued which
will delete any record in the table named <var table> whose
field named <var keyname> matches the value of <var key>.

You must supply <var table> and <var keyname>, where <var keyname> is the name of the primary key field in table.")("KEY-ARGS"  "table=tablename" "keyname=fieldname")("REQ-ARGS"  "dbvar" "key" "table" "keyname")("SECTION" . "odbc-database-operators")("FUNTYPE" . "simple")("NAME" . "odbc::database-delete-record")))("REQUIRE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "<code>require</code> tries hard to locate the source or library file specified by <var stem>, and then loads that file if it hasn't already been loaded.

If the variable <varref mhtml::require-directories> is present, then it is an array of directory names (without trailing slashes) relative to Web space that should be searched through, in the order that they appear in the array.

<code>require</code> understands the following extensions:

<ul>
<li> <b>.mhtml</b>, or <b>.src</b>: A <meta-html> source file.

<li> <b>.lib</b>: A <meta-html> library file.
</ul>

<code>require</code> loads the newest version of the file that it finds, and records the complete pathname of the loaded file in the array variable <varref mhtml::require-loaded>.
")("KEY-ARGS" . "")("REQ-ARGS" . "stem")("SECTION" . "file-operators")("FUNTYPE" . "simple")("NAME" . "require")))("MHTML::FULL-URL-SANS-SID" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "The URL used to connect to the current document, including protocol, host information, path-information, and query strings, but excluding the session ID.

<complete-example>
<get-var mhtml::full-url-sans-sid>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "")("SECTION" . "page-variables")("FUNTYPE" . "variable")("NAME" . "mhtml::full-url-sans-sid")))("WORD-WRAP" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Produce paragraphs of text from the string <var string> with the text filled to a width of <var charwidth>.

This is provided for convenience only, and is of use when you need to present some free form text in pre-formatted fashion, such as when sending an E-mail message, or the like.
")("KEY-ARGS" . "width=charwidth")("REQ-ARGS" . "string")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "word-wrap")))("DATABASE-SAVE-PACKAGE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Save the variables from the package <var package> in the database referenced by <var dbvar> in the record specified by <var key>.

If <var strip=true> is supplied, then the names of the variables written to the database have their package prefix removed as they are written.

Upon success, this function returns the string <code>\"true\"</code>.

<example>
<set-var foo::x=x foo::array[0]=val0 foo::array[1]=val1>
<with-open-database db /tmp/file.db mode=write-create>
  <database-save-package db mykey foo strip=true>
</with-open-database>
</example>

produces
<example>
true
</example>")("KEY-ARGS" . "strip=true")("REQ-ARGS"  "dbvar" "key" "package")("SECTION" . "database-commands")("FUNTYPE" . "simple")("NAME" . "database-save-package")))("OR" (("OPT-ARGS" . "...")("KEYWORDS" . "")("SHORT-DESC" . "Evaluates the <var expr>s until one of them results in a non-empty value, or they are all exhausted.

The result of this expression is the last value evaluated.
")("KEY-ARGS" . "")("REQ-ARGS" . "expr")("SECTION" . "relational-operators")("FUNTYPE" . "simple")("NAME" . "or")))("PAGE-DEBUG" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Cause <var body> to be inserted into the debugger output.

This output shows up as the result of placing the special tag &lt;<funref language-operators DEBUGGING-OUTPUT>&gt; somewhere in the page.
")("KEY-ARGS" . "")("REQ-ARGS" . "body")("SECTION" . "language-operators")("FUNTYPE" . "simple")("NAME" . "page-debug")))("BASE64DECODE" (("OPT-ARGS" . "")("KEYWORDS" . "crypt; transfer encoding")("SHORT-DESC" . "Performs the translation operation commonly known as <i>Base64 Decoding</i> on <var STRING>, and returns the results of that decoding.

Base64 encoding is a common transfer encoding for binary data and for Basic Authorization values -- this function can be used to turn such strings into their original, pre-encoded state.

<complete-example>
<set-var the-data = \"YmZveDpmcm9ibml0eg==\">
<base64decode <get-var the-data>>
</complete-example>
")("KEY-ARGS" . "")("REQ-ARGS" . "string")("SECTION" . "string-operators")("FUNTYPE" . "simple")("NAME" . "base64decode")))("ALIST-TO-PACKAGE" (("OPT-ARGS" . "")("KEYWORDS" . "")("SHORT-DESC" . "Takes the textual list representation of a package, and creates (or modifies) the package named by <var package-name>.
")("KEY-ARGS" . "")("REQ-ARGS"  "alist" "package-name")("SECTION" . "packages")("FUNTYPE" . "simple")("NAME" . "alist-to-package")))("DEFMACRO" (("OPT-ARGS" . "named-parameter...")("KEYWORDS" . "")("SHORT-DESC" . "A synonym for <funref macro-commands define-container>.
")("KEY-ARGS"  "package=package-name" "whitespace=delete")("REQ-ARGS" . "name")("SECTION" . "macro-commands")("FUNTYPE" . "complex")("NAME" . "defmacro")))("DEFVAR" (("OPT-ARGS" . "")("KEYWORDS" . "default; defining; define")("SHORT-DESC" . "<b>DEF</b>ault the value of the <b>VAR</b>iable named by <var name> to <var value>.

<code>defvar</code> assigns <var value> to <var name> if, and only if, <var name> has a non-empty value.

<code>defvar</code> could have been defined in <Meta-HTML> using <funref macro-commands define-tag>:

<example>
<define-tag defvar>
  <if <not <get-var %0>> <set-var %0=%1>>
</define-tag>
</example>
")("KEY-ARGS" . "")("REQ-ARGS"  "name" "value")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "defvar")))("COERCE-VAR" (("OPT-ARGS" . "")("KEYWORDS" . "data type; ")("SHORT-DESC" . "Coerces <var varname>'s data to have the type specified by the argument to <var type>.  You can convert a binary object to a string object, and vice-versa.

A binary variable might be created as the result of a call to <funref stream-commands stream-get-contents>, for example.  Once the data is read, you might wish to perform some substitutions on it, or otherwise get its value.  To do so, you call <code>coerce-var</code> on the value:

<example>
   <with-open-stream s /tmp/file mode=read>
     <stream-get-contents s foo>
   </with-open-stream>

   <coerce-var foo type=string>
   <subst-in-string <get-var foo> \"Hello\" \"Goodbye\">
   <get-var foo>
</example>
")("KEY-ARGS" . "type=(STRING|BINARY)")("REQ-ARGS" . "varname")("SECTION" . "variables")("FUNTYPE" . "simple")("NAME" . "coerce-var")))