Again with the start using.
Mark Wieder
mwieder at ahsoftware.net
Mon Mar 1 14:39:44 EST 2004
Richard-
Monday, March 1, 2004, 11:00:59 AM, you wrote:
RG> It's one of the flexibilities of the language, like using "the cursor"
RG> or simply "cursor".
RG> In my experience you can optionally drop "stack" from the start using,
RG> toplevel, palette, modal and modeless commands (possibly others as well,
RG> but I'm sleep-deprived today and can't think of any more <g>).
Not always. I just spent several nerve-wracking hours yesterday
tracking down a problem in my code that had to do with leaving out the
word "stack":
I have the name of my main stack placed in global gMainStack. Then
repeat with x=1 to the number of cards of stack gMainStack
^^^^^
gives an *entirely* different result from
repeat with x=1 to the number of cards of gMainStack
when called from a substack.
I have 26 cards in my main stack and I kept getting a result of 2 (the
number of cards in the substack I was calling from) from this line
before I realized that I had forgotten the keyword "stack". Apparently
everything after the "number of cards" argument was just getting
ignored if I left off the qualifier.
I'm gonna bugzilla this one. I'd rather have the compiler flag an
error for me than just treat the rest of the line as a comment.
--
-Mark Wieder
mwieder at ahsoftware.net
More information about the use-livecode
mailing list