Variable Encoded Format (VEF)

Description

This encoding is used in output format specification and allows field values and environmental variables, not determined until the form is submitted, to be included in a pre-formatted file or other text. In other words, the text encoded in VEF is like a template to be instantiated at run time.

First values in fields are inserted, replacing $xxx with the contents of the field named xxx. (To get a literal "$", use "$$".)

Then environmental variable values inserted, replacing %xxx with the value of the environmental variable named xxx. (To get a literal "%", use "%%".)

Example

If the text to filled in is:
Hello. My name is $name. You killed my $relative. Prepare to $action.
Your computer is %rhost and your web browser is "%HTTP_USER_AGENT".
Pay $$1000 or 40%% of your cash on hand to leave sickbay.
and the fields $name, $relative, and $action happen to contain the values "Inigo Montoya", "father", and "die" relatively, the result might be:
Hello. My name is Inigo Montoya. You killed my father. Prepare to die.
Your computer is pres.whitehouse.gov and your web browser is "Mozilla/2.0b6a (X11; I; SunOS 4.1.3_U1 sun4m)".
Pay $1000 or 40% of your cash on hand to leave sickbay.

(In case you missed it, the first line is a reference to The Princess Bride, which is a very funny film.)

See Also


[HFPM Home] [Please comment]
Copyright © by James Hoagland
www.hoagland.org | webmaster@hoagland.org
1 February 1996