Expression calculations in message box
Jim Lyons
jimlyons at earthlink.net
Tue Feb 1 22:28:27 EST 2005
Wow, that's a good one. Verified on Rev 2.5, OS 10.3.
I have seen some serious wonkiness before in the message box handling
of expressions. I remember I had to put an expression involving arrays
into a handler in the stack I was working on and invoke that to
evaluate it correctly; I was quite sure it wasn't because of context,
or variable scope, it was really something simple. But that's the sort
of thing that happens late at night, at the same time as several other
things that should work don't. I couldn't recall how to reproduce it.
Maybe this will be a clue to the faulty script...
Jim
Alex Tweedly wrote:
> Open a new Runrev session.
> Open the message box (single line)
> Type into it
> put 1 into m; put ((m)+9)
>
> What value should appear ?
> I expected 10 - but I actually get 1
>
> If I put a space between the two "("s - i.e.
> put 1 into m; put ( (m)+9)
> then I do indeed get 10.
>
> Don't see the same problem when using the multi-line message box - but
> this is baffling me.
> Is there something special about the message box that would explain
> this
> anomaly ?
> Or is there something non-obvious (to me) about this expression ?
More information about the use-livecode
mailing list