Help, what am I doing wrong???

Dennis Brown see3d at writeme.com
Sat Jul 30 22:24:58 EDT 2005


Mark,

I never had any trouble remembering that something in a loop variable  
is a copy, because that is what I would expect.  However, it appears  
that what we have is just a label, not really a variable --that is  
until we exit the loop, then we have a variable with the last  
contents in it.

I would really like to get a real error message since it does not do  
what you expect from reading the code.  How many newbies do we have  
to trip up before we erect a stop sign at that intersection?

Should I BZ it?

Dennis

On Jul 30, 2005, at 10:15 PM, Mark Wieder wrote:

> Dennis-
>
> Saturday, July 30, 2005, 12:13:06 PM, you wrote:
>
> DB>  >>  Important!  You cannot change the labelVariable in a  
> statement
> DB> inside the loop. Doing so will cause a script error..."
>
> DB> Well I never got that script error message!
>
> Well, it's not exactly an error "message"... it *will* cause a script
> "error", in the sense that your script will not do what you expect it
> to do. This has tripped me up more times than several. I now try
> really hard to remember to make a copy of the labelVariable and work
> with that.
>
> I would prefer it if the engine handed a copy of the loop variable to
> the script and worked with its own immutable version internally, but
> I'm not sure that would be any less confusing. You'd still have to
> remember that you were working with a copy.
>
> -- 
> -Mark Wieder
>  mwieder at ahsoftware.net
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
>




More information about the use-livecode mailing list