THE META-HTML LANGUAGE REFERENCE MANUAL

Session Operators [TOC] Macro Commands

Section Intro: Language Operators

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:

Variables:

<autoload FUNCTION &key [MODULE] [TYPE] &rest funargs>Simple

    Define FUNCTION as a placeholder function for a dynamically loaded one. AUTOLOAD creates a function in Meta-HTML which, when invoked, replaces itself with a function of the same name found in the dynamically loadable module MODULE. This allows a great many functions to be defined in Meta-HTML, without having to actually have an entire library of support routines loaded. For example, the function COS is defined as an autoloaded function by default in a pristine Meta-HTML:

     <autoload cos num module=modmath>
     

    To define a macro or weakmacro, you must supply the TYPE key:

     <autoload with-open-stream stream &key type mode module=streams type=macro>
     

<bootstrapper::system-initializeSimple

    Defined in libmhtml/standard.mhtml, this function is called immediately after the tagsets in libmhtml/tagsets have been initialized by the system on bootstrap. You probably don't know what this means, so just forget about it.

    Suffice to say, here is the first user-defined function run by Meta-HTML for every invocation of the server, engine, debugger, or standalone processor (excepting when that program is called with "-z").

    I cannot think of a reason why or how you would modify this function, unless you are modifying the behaviour of Meta-HTML in general. If you think that you need to modify this, perhaps you really want something like %%after-page-return.

<comment
  body
</comment>
Complex

    Simply discard the 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 (;;;), then the text from this sequence to the end of the line inclusive is discarded.

    Example:

    <comment>
      This text is simply ignored.
    <p>
      All of it.
    </comment>
    ;;; So is this text, up to the end of the line.
    ;; But NOT this line -- it only has two semi-colons on it.

<eval-file FILENAMESimple

    Read the contents of FILENAME, and evaluate its contents in the context of the caller. If FILENAME cannot be read, then execute the value of ALT if it is passed.

    FILENAME is a fully qualified pathname to a file anywhere within the file system.

<make-identifier &optional [LIMIT] &key [ALPHABET]Simple

    Create an identifier that is LIMIT characters in length. LIMIT defaults to 16 if not specified. The identifier characters are taken from the string variable MI::ALPHABET, unless passed in from keyword argument ALPHABET. If there is neither a passed in alphabet, nor a value for MI::ALPHABET, then the alphabet defaults to uppercase letters and numbers excluding "I", "O", zero, and one.

<parser::change-brackets BRACKET-PAIRSimple

    Add the matched open and close bracket characters to the special characters that are understood by the Meta-HTML parser. For example, calling this function like this:

    <parser::change-brackets "{}">
    causes the character "{" to be in the same syntax class as "<", such that an expression {get-var foo} would return the value of FOO.

    This function is only available after loading the parser module:

    <load-module parser> ==> /www/lib/parser.so

    For more information on loading dynamic modules in Meta-HTML, please see the documentation for load-module.

<pidSimple

    Returns the process ID of the currently executing Meta-HTML interpreter, on those systems which have process IDs.

<with-safe-environment
  body
</with-safe-environment>
Complex

    Execute BODY in an environment where commands that could affect the file system are disabled. In addition, commands which can define or undefine functions are disabled.

    This command is especially useful when filtering input from an external source, such as a third party Web page.

Edit Section
Function Index
Variable Index


The META-HTML Reference Manual V2.0 Copyright © 1995, 1998, Brian J. Fox
Found a bug? Send mail to bug-manual@metahtml.org