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
ll submit an enhancement request.
>
> -- Alex.
>
> On 29/05/2012 04:57, dunb...@aol.com wrote:
>> Alex.
>>
>>
>> I have found that if you say this:
>>
>>
>> contant x = 4
>>
>>
>> on mouseup
>> answer x
&
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
.com wrote:
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---
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..
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
edly
To: How to use LiveCode
Sent: Mon, May 28, 2012 7:02 pm
Subject: Constant statement limitations.
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 the constant stateme
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 the constant statement
in a script outside any handler, you can use the constant anywhere in
the handlers of that script.
NB - "can use the