Another newb question - How to you clear a field?

Jerry J jhj at jhj.com
Sat May 9 15:46:24 EDT 2009


> From: "J. Landman Gay" <jacque at hyperactivesw.com>
>
> Yes, that is what I meant. But Dave Cragg disproved my theory, since
> apparently the engine works at the same speed in either case (but I am
> still having trouble believing it; it seems counter-intuitive.) I  
> think
> it is better scripting form to quote literals in any case though. It
> saves misinterpretation later on when you re-read your scripts, and in
> some cases could prevent the engine from mis-interpreting your literal
> values as variable names.

Wouldn't the decision whether something is a variable or a literal be  
done just once at *compile* time, not a run time? After deciding, the  
compiler would point to either the location of a variable or the  
location of a literal string - either would be equally fast. So it  
doesn't matter how many loops - actually fewer might show up the  
slower decision making process during compilation, but even that is  
doubtful. Now if the benchmark had 100000 different unquoted literals,  
we would see the difference!

I heartily agree that literals should be quoted for all those other  
good reasons.

Cheer,
Jerry Jensen




More information about the use-livecode mailing list