undeclared variables getting through in Strict Compilation mode
Dr. Hawkins
dochawk at gmail.com
Tue Feb 17 22:38:17 EST 2015
On Tue, Feb 17, 2015 at 2:57 PM, Bob Sneidar <bobsneidar at iotecdigital.com>
wrote:
> Ya know, simply turning off explicit variables for now allows you to move
> forward with your project. Who knows, you might like it. ;-)
With my typing, that would be a bad idea (tm), Dr. Venkman . . .
I was able to go forward by declaring the variable like it should again.
Actually, I'm not happy in general that variable names are case
insensitive. But then, I also want c-like variable scoping (can't think of
anything else I want from that language, but the ability to declare a local
variable within just about any structure, and to wrap {} around a block of
code to create a local scope are wonderful.
Aside from that, though . . .
And on further consideration, i'm not sure that not using strict
compilation would have helped--this variable needed to be global, and was
declared global in other contexts, and needed to be declared global here.
OK, I'm also a global variable hater, but recognize their necessity in some
circumstances for the main data array and some control values. I do,
though, make sure that my code still *could* replace such references with a
getVar() function if I wanted to eimplement one later. But I learned about
the price of context switches and calls twenty years ago (wait!? how
long?) in graduate school when I wrote an artificial life model in "proper"
smalltalk, rewrote in Fortran, and got a 45,000:1 speedup (and I think I
had the fortran index order backwards at that!)
--
Dr. Richard E. Hawkins, Esq.
(702) 508-8462
More information about the use-livecode
mailing list