next up previous
Next: A comment on language design
Up: The WOM language
Previous: Reading and writing data files

Running WOM stand-alone

The methods defined by the WOM classes can of course be executed from any appropriate context, in particular from an interactive program such as Rexxtry. This is useful in testing, and we provide some abbreviations, such as an out method for emitting HTML to .output, and a [] method for looking up paths.

We show some examples below.

t = .Top~new
/* 1 - Create an instance. */

t~doUpdate
/* 2 - Initialise it. */

t~emit( .output )
/* 3 - Output its HTML to .output. */

t~out
/* 4 - The same. */

f = t['Fact']
/* 5 - Set f to the Fact instance of t. */

c = t['Count']
i = c['input']
v = i~getValue
/* 6 - get the value of the input field t.Count.input. */

v = t['Count.input']~getValue
v = t['Count']['input']~getValue
/* 7 - Two other ways to do the same. */



Jocelyn Ireson-Paine
Fri May 30 14:03:06 BST 1997