Hi Kjetil,
--On June 15, 2006 12:12:33 AM +0200 Kjetil Torgrim Homme
<kjetilho(_at_)ifi(_dot_)uio(_dot_)no> wrote:
I agree.
If an "import" command lists a variable that has not been exported
and set by any other script at that point during the SIEVE execution
process, then an error MUST occur.
I suggest that "and set" is removed. remember that changes made to the
imported variable will be visible in the parent. this is how values are
returned from "calling" sub-scripts, and it would be strange to require
the parent to set it prior to the call. this should probably made clear
in the draft.
OK, that makes sense and I will update the draft accordingly. However, one
questions: what should happen if an "export" command references a variable
not defined in the remainder of the script? I don't think I called out that
case explicitly. Should that be an error, or should it be allowed?
another issue -- the examples say:
| require ["variables", "include"];
| export ${test}
further up it says the argument is a string list, so it would have to be
export "${test}";
I would prefer that the variable name was used unadorned, however, as I
would expect ${test} to be expanded to the value, no matter how
nonsensical that is... so:
export "test";
it should also be made clear that the strings in the list need to be
constant strings, ie. without ${variable} references.
OK, I will fix the examples as you suggest.
--
Cyrus Daboo