Re: Script Object Order in Script
Re: Script Object Order in Script
- Subject: Re: Script Object Order in Script
- From: email@hidden
- Date: Wed, 25 Jul 2001 23:42:45 -0400
On Tue, 24 Jul 2001 14:44:09 -0400, "Marc K. Myers" <email@hidden>
suggested,
>
> It seems to me that after the script has been compiled, all
>
> script objects defined at the top-level of the script should
>
> be just as "global" as all handler definitions.
>
>
The difference is that the script object doesn't come into being until
>
its code is executed. This initializes the script object. Handlers, by
>
contrast, come into existence when the script is compiled.
Script objects that are defined with a name, at the top level of the script,
come into existence at compile time. Compare these two scripts
-- #1
script a
property d:current date
end script
d of a
-- #2
script
property d:current date
end script
d of result
Run #1 repeatedly, and you see the same date each time. Run #2, and it returns
a different date each time.
--
Scott Norton Phone: +1-703-299-1656
DTI Associates, Inc. Fax: +1-703-706-0476
2920 South Glebe Road Internet: email@hidden
Arlington, VA 22206-2768 or email@hidden