| THE META-HTML LANGUAGE REFERENCE MANUAL

Msql Database Extensions | [TOC] | Macro Commands

## Section Intro: Language Operators

Synopsis:

Meta-HTML provides various functions and variables which are used to operate on or within the language environment itself, rather than within the application environment.

Such constructs make it possible to create self-modifying code, to change the way in which a builtin function operates, and other such language dependent features.

Commands:

%%eval %%read concat date | debugging-on debugging-output page-debug pid | prog symbol-info system-error-output time

Variables:

env::http_referer env::http_user_agent env::query_string env::remote_addr | env::remote_host env::server_port mhtml::exec-path mhtml::inhibit-comment-parsing | mhtml::prologue-document mhtml::referer mhtml::server-name mhtml::server-port | mhtml::server-root mhtml::unparsed-headers mhtml::version

### Function Documentation

`<%%eval [EXPRESSION]>` | Simple

Internal function which performs evaluation.

If you think that you need this in your program, you probably are doing something wrong.

`<%%read [EXPRESSION]>` | Simple

Internal function which performs Meta-HTML reading.

If you think that you need this in your program, you probably are doing something wrong.

`<concat [ARG1] ... [ARGN]>` | Simple

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:

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

`<date [EPOCH-SECONDS]>` | Simple

Returns the local date as a string of 24 characters.

The output looks like `Fri Jun 20 08:42:15 1997`.

Given the optional argument 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 `time` function.

`<debugging-on [FUNCTION-NAME=LEVEL]>` | Simple

Turns on debugging for the FUNCTION-NAMEs mentioned, setting the level of output to LEVEL. LEVEL is a number between `0` (the least amount of debugging info) and `10` (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 <`DEBUGGING-OUTPUT`> somewhere in the page.

`<DEBUGGING-OUTPUT>` | Simple

By placing the `<DEBUGGING-OUTPUT>` 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.

`<page-debug BODY>` | Simple

Cause BODY to be inserted into the debugger output.

This output shows up as the result of placing the special tag <`DEBUGGING-OUTPUT`> somewhere in the page.

`<pid>` | Simple

Returns the current process ID on those systems which have process ID's.

`<prog CODE...>` | Simple

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:

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

Although `prog` is a primitive in Meta-HTML, it could have been defined as:

    <defsubst prog>%body</defsubst>

`<symbol-info SYMBOL>` | Simple

Returns information about the symbol SYMBOL.

The information is two lines:

1. The type of the symbol, either STRING, BINARY, or FUNCTION.
2. The "size" of the symbol.

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.

`<SYSTEM-ERROR-OUTPUT>` | Simple

By placing the `<SYSTEM-ERROR-OUTPUT>` 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.

`<time>` | Simple

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 `date` operator. Here is how one might find out the printable date for the time 10 hours from now.

       <date> --> Wed Jul  3 17:14:53 1996
       <date <add <time> <mul 60 <mul 10 60>>>>
              --> Thu Jul  4 03:14:57 1996

Edit Section
Function Index
Variable Index

The META-HTML Reference Manual V1.4 Copyright © 1995, 1996, Brian J. Fox, 1996, 1997 Universal Access Inc.
Found a bug? Send mail to bug-manual@metahtml.com