lout-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Equation display styles and context-sensitive rendering


From: Jeff Kingston
Subject: Re: Equation display styles and context-sensitive rendering
Date: Tue, 05 Dec 2006 07:05:31 +1100

Given that the elements of environments don't behave anything
like other Lout symbols, I think you would be better off not
declaring them as symbols, but just having 

    @SetEnv key { string } value { object } object

to set the value of an environment variable named string in
the second object to the first object, and

    @GetEnv string

to retrieve the value of the environment variable whose name
is string from the current environment and return it as result.

All you need to implement these basically is a symbol table
in STYLE objects, although updating will be a pain.  Plus you
need some way to initialize any variable you use.

See the discussion of environment variables in the Nonpareil
documentation for a full presentation of all the issues.
The "class extension" feature was added to Nonpareil to allow
all these things.

Jeff

ps It's probably best to always initialize to the empty object,
and always have a meaningful interpretation for that value.
That way, if the object is not in the symbol table at all,
you can return the empty object and keep going.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]