Re: Constant statement limitations.

2012-05-29 Thread Peter W A Wood
I know its a kludge but couldn't you do something like: " end somehandler on run-it put "lc version is" && the version & "" put "this web page shows the problem" & "" put "here x = " && x & "" somehandler put "and finally x still =" && x & "" end run-it run-it ?> Regards Peter On

Re: Constant statement limitations.

2012-05-29 Thread Keith Clarke
Forgive the naiveté (I have no formal development background) - and so maybe there is a subtlety about the formal definition of constants in computer science that I'm missing - but to have a mathematical constant available outside of handlers, can we not choose from script variables, global vari

Re: Constant statement limitations.

2012-05-29 Thread Alex Tweedly
Thanks Igor, but you're talking about where constants can be declared; I was talking about where they can be used. I read the dictionary the same way you do, in the context of declaration (constants can be declared within or outwith handlers, with different context). And I agree with Mark that

Re: Constant statement limitations.

2012-05-29 Thread Alex Tweedly
No. What tripped me up was " constant x = 4 put "this web page shows the problem" & "" put "here x = " && x & "" on somehandler put "within a handler, x =" && x & "" end somehandler somehandler put "and finally x still =" && x & "" ?> Constants do not take effect *outside* handlers. You rar

Re: Constant statement limitations.

2012-05-28 Thread Mark Wieder
Igor- I have to say that the concept of a local constant makes absolutely no sense to me. In any reasonable language I would expect a compiler error if I tried to redefine a constant, much as the LiveCode engine does if you try to redefine a constant outside of a handler. -- -Mark Wieder mwie..

Re: Constant statement limitations.

2012-05-28 Thread Igor de Oliveira Couto
Alex, I don't know if you and I are reading the dictionary in the same way: On 29/05/2012, at 9:00 AM, Alex Tweedly wrote: [...] > The dictionary entry for constant says: >> >> If you place the constant statement in a handler, you can use the constant >> anywhere in the handler. If you place t

Re: Constant statement limitations.

2012-05-28 Thread dunbarx
Alex. I have found that if you say this: contant x = 4 on mouseup answer x end mouseup You get a "4" But, if you place the contstant statement below the handler, you geet "x". Is this what tripped you up? Craig Newman -Original Message- From: Alex Tweedly To: How to use