THE META-HTML LANGUAGE REFERENCE MANUAL

[TOC]

Manual Page Viewer

Name: OR

Section: Relational Operators


Synopsis:

    <or &rest expr...>

Description:

    or evaluates each EXPR given until one of them evaluates to a non-empty string, or until they are all exhausted. The result is the result of the last evaluation. Evaluating just <or> returns the empty string.

    Examples:

    <or>                    ==> 
    <or this that>          ==> this
    <unset-var foo>
    <or <get-var foo> this> ==> this
    <or this <get-var foo>> ==> this
    <set-var foo=bar>
    <or <get-var foo> this> ==> bar

    <or> could have been defined in Meta-HTML as follows:

    <define-tag or &unevalled &rest expressions[] whitespace=delete>
      <foreach :expr expressions>
        <set-var result = <get-var-eval :expr>>
        <if <get-var-once result>
            <break>>
      </foreach>
      <get-var-once result>
    </define-tag>

Edit Pointer
Function Index
Variable Index
Variable Editor


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