Kee-
Monday, December 28, 2009, 5:50:19 PM, you wrote:
> You are using it as a script variable. It's a local variable that is
> available from any handler in the script. If you want true local, then put
> the declaration inside the desired handler
Additionally, you're using "y" as both a scr
OK so there are locals that are local to a specific script, and locals to a
specific handler. That's interesting. Thank you!
Kee Nethery
On Dec 28, 2009, at 5:50 PM, stephen barncard wrote:
> You are using it as a script variable. It's a local variable that is
> available from any handler in the
You are using it as a script variable. It's a local variable that is
available from any handler in the script. If you want true local, then put
the declaration inside the desired handler
sqb
-
Stephen Barncard
San Francisco
http://houseofcubes.com/disco.irev
2009/12/2
OK this is weird, also in 4.0. A local variable appears to be treated as a
global variable.
local x, y, myvariable
on mouseup
put empty into myvariable
repeat with x = 1 to 1000
repeat with y = 1 to 1000
put x && somefunction(y) & return after myvariable
end repeat
end repeat
Hi all.
I discovered an odd thing with script local variables. If I call a
function within a card script that uses script local variables, but I
call it from the message box, the script local variables are not
visible. But if I call the function from an object ON the card, then
they ARE
Josh-
Friday, July 28, 2006, 10:26:19 AM, you wrote:
> Is there an advantage to declaring local variables? (other than a
> reminder?)
(taken off line to avoid getting into the religious wars once again)
--
-Mark Wieder
[EMAIL PROTECTED]
_
If you turn on explicit variable, then you have to. Turning this on can
catch some script errors (like misspelled variable names).
Otherwise there isn't really any advantage that I can think of.
At 12:26 PM 7/28/2006, you wrote:
Is there an advantage to declaring local variables? (other
Is there an advantage to declaring local variables? (other than a
reminder?)
On Jul 27, 2006, at 2:58 PM, Mark Wieder wrote:
Cute. I couldn't resist fiddling with it a bit.
ON convertTime
local t
local ampm
local t2
___
use-revol
On Jul 26, 2006, at 5:38 PM, Dar Scott wrote:
I'm finding a script local variable is being cleared. I can't
figure out where or how.
I figured it out. -- Dar
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to
I'm finding a script local variable is being cleared. I can't figure
out where or how. I know setting the script will clear a script
local variable. Can anything else? Other than a 'put' and the like?
I check at all places it is set to assure it is not empty. The later
in something els
>> there is absolutely nothing
>> to be gained by
>> declaring a handler local variable unless one
>> uses explicitVariables.
Not entirely. Decalring a variable is a simple way of initialising it, to
empty unless defined. This can be truly helpful when returning values (in "it"
or in "the re
Hi Erik,
there is absolutely nothing
to be gained by
declaring a handler local variable unless one
uses explicitVariables.
you can set the order in which they appear in VW.
you can see at a glance what to look for.
I'm not seeing that here:
on mouseUp
local xValue
local aVa
--- Rob Cozens <[EMAIL PROTECTED]> wrote:
> there is absolutely nothing
> to be gained by
> declaring a handler local variable unless one
> uses explicitVariables.
you can set the order in which they appear in VW.
you can see at a glance what to look for.
Erik Hansen
[EMAIL PROTECTED]ht
Hi Peter,
If a variable is not declared outside a handler, it is assumed to be a
handler local variable and reinitialized every time the handler is
called.
I stand corrected...
though in that case there is absolutely nothing to be gained by
declaring a handler local variable unless one us
Yes, Malte. You are absolutely right. By unchecking "variable checking" in
the preferences, the scripting no longer requires me to declare local
variables before using them. Thanks!
Steve Goldberg
In a message dated 6/7/06 2:20:12 PM, [EMAIL PROTECTED]
writes:
> Have y
On 6/7/06 8:00 AM, "Peter T. Evensen" <[EMAIL PROTECTED]> wrote:
> On your second point, do you mean a declared local variable OUTSIDE a
> handler?I think you are confusing a declared local variable INSIDE a
> handler with one that is declared OUTSIDE a handler.
>
> I don't believe one declar
... I made a fool of myself online...
Until now I've had the impression that global variables need to be declared,
whereas local variables do not. However, I've just noticed that (using Rev
2.7, Mac OS X) if I don't declare the local variable before the scripting, I
get an err
M 6/7/2006, you wrote:
Hi Steve,
Until now I've had the impression that global variables need to be declared,
whereas local variables do not.
That depends on whether one wants the value of the local variable to
persist during runtime:
* An undeclared local variable is initialized to e
Hi Steve,
Until now I've had the impression that global variables need to be
declared,
whereas local variables do not.
That depends on whether one wants the value of the local variable to
persist during runtime:
* An undeclared local variable is initialized to empty every tim
set the cpCustomProperty of card "Some Card" to "something"
Doh! It seems the compiler/syntax checker could produce a more helpful
error message in this case...
At 08:16 AM 6/7/2006, you wrote:
Until now I've had the impression that global variables need to be decla
Hi!
Have you accidently checked "variable checking" in the preferences-
>Script editor?
All the best,
Malte
___
use-revolution mailing list
use-revolution@lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription
Until now I've had the impression that global variables need to be declared,
whereas local variables do not. However, I've just noticed that (using Rev
2.7, Mac OS X) if I don't declare the local variable before the scripting, I
get an error message "Can't create
On Dec 23, 2004, at 10:04 PM, [EMAIL PROTECTED]
wrote:
From: Dar Scott <[EMAIL PROTECTED]>
Subject: Re: Script local variables and initialization.
To: How to use Revolution
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; format=flowed
On Dec 23, 2004
Dar Scott wrote:
On Dec 23, 2004, at 1:42 PM, Alex Tweedly wrote:
(i.e. I call one of the handlers within the card script from
preOpenStack, that sets an initial value, but that value appears to
be lost. I know it's probably a bad idea to call a card handler from
preOpenStack, and I'll be chang
This may not be needed; I tried what I thought you said and it worked
for me.
On Dec 23, 2004, at 2:58 PM, Alex Tweedly wrote:
Here is a way to find out if it is being compiled twice and when.
Use a later version and put in a new command in the script. Then
open the stack on an earlier versio
On Dec 23, 2004, at 2:51 PM, Dar Scott wrote:
call "setL x" of card 2 of me
I also tried send and send in time.
Maybe you forgot to Close and Remove from Memory?
Dar
**
DSC (Dar Scott Consulting & Dar's Lab)
http://www.swcp.com/dsc/
Programm
this within debugger - and can see the local
variable starting empty and having "1" assigned to it).
Then when I click on any of my navigation buttons, "Display" is called
again - but the debugger shows that the local variables are all empty,
including the one(s) set in the
On Dec 23, 2004, at 1:42 PM, Alex Tweedly wrote:
(i.e. I call one of the handlers within the card script from
preOpenStack, that sets an initial value, but that value appears to be
lost. I know it's probably a bad idea to call a card handler from
preOpenStack, and I'll be changing that anyway -
On Dec 23, 2004, at 1:42 PM, Alex Tweedly wrote:
The docs are a bit vague
The value of a script local variable is retained between handlers,
but is lost when you quit the application, when you close the stack
(unless its destroyStack property is false), or when the script is
re-compiled.
which d
I think I've discovered something, but if possible I'd like it to be
confirmed (or alternatively, to know that I'm wrong, and then I can go
back to debugging).
I have some script local variables, used in multiple handlers within the
card script. I expected them to be reset at s
--- Ken Ray <[EMAIL PROTECTED]> wrote:
> Locals are the same as globals, except that
> they cannot have a scope outside
> of a single script. If you declare them inside
> of a handler, they apply only
> to that handler. If you declare them inside of
> a script, they are available
> to any handler
OTECTED]
Web Site: http://www.sonsothunder.com/
- Original Message -
From: "Andre Rombauts" <[EMAIL PROTECTED]>
To: "revolution" <[EMAIL PROTECTED]>
Sent: Sunday, November 10, 2002 4:01 PM
Subject: Global /local variables
> I do not understand the real
bal", then any
handler in any script could access it, either by declaring it inside
the handler or in the script but outside the handler.
Cheers,
Sarah
On Monday, November 11, 2002, at 08:06 am, Andre Rombauts wrote:
I do not understand the real meaning of global and local variab
I do not understand the real meaning of global and local variables in
Revolution... The info about declaring variables outside a handler seems to
be equal in both cases... :-(
>From the local¹ entry in Revolution Help system:
>You can also use the local command in a script, outside any ha
34 matches
Mail list logo