parsing comments in scripts
alex at tweedly.net
Mon Dec 13 15:25:52 EST 2004
At 13:43 13/12/2004 -0600, Ken Ray wrote:
> > The technique of commenting out the first line to disable the handler
> > does not work in Transcript.
>You've said this a couple of times, but I have handlers where the first line
>is commented and the handler *is* disabled. Can you give an example of where
>this is not true?
There's an example (rather trivial one) in the Bugzilla entry (2468)
A more serious one is
> local tLine
> put "original B string" into tLine
> put tLine & cr after msg
> put "the C version" into tLine
This prints out "original B string" to the message box.
Comment out the first line of A, and it will now output "the C version".
The comment has disabled handler A, except for the local tLine statement,
which has become script-local, and therefore changed the effect of the
(implicit) declarations of tLine within B and C. So now the two handlers
interfere with each other, when normally they wouldn't.
More information about the use-livecode