|
THE META-HTML LANGUAGE REFERENCE MANUAL
|
Manual Page Viewer
Name: VAR-CASE
Section:
Flow Control
Synopsis:
<var-case [{NAME=VALUE] [CONSEQUENT}...] [DEFAULT] [DEFAULT-CONSEQUENT]>
Description:
For each NAME=VALUE pair, the value of NAME is string-wise compared with VALUE. If they are identical, then the corresponding CONSEQUENT code is performed, and its value is the return value of the <var-case>
form.
If none of the clauses match, and there is a DEFAULT
clause, then the DEFAULT-CONSEQUENT is evaluated, and its return value is the return value of the <var-case>
form.
var-case
is especially useful as a `traffic
switch' to select one of several actions based on a user button press.
For 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>>>
Edit Pointer
Function Index
Variable Index
Variable Editor

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