#More Modula-2 Questions
22-Oct-86 21:30:49
Sb: #36954-#More Modula-2 Questions
Fm: Steve Faiwiszewski 74106,425
To: Lon Leader 72355,1754
This message turned up in search, but its forum couldn’t be identified from the original transcript, so it may not be linked into its thread.
Re: first problem. Hmmm.. I see your point. It seems to me that the
RefreshGadgets procedure is declared incorrectly in the Gadgets module. The
third parameter should have been an address, and not a Requester. This is
not the first time I've seen this problem of wrong declaration. (Richie, do
you see a way around this?)
Re: second problem. You don't seem to understand. I'm not talking about
the system's stack (the one you set with the CLI STACK command). What I
meant was, the way Modula (and C) works is that when you enter a procedure
storage for all the local variables gets allocated, and when you exit the
procedure that storage is reclaimed and those variables are destroyed,
kaput, gone! So if Intuition still tries to refer to them, thinking
they're still there, well you've seen what happens. The solution is that
you gotta keep those variables used by Intuition global. If you don't want
them to be visible to other procedures, put them in a separate module –
that's why Modula is so great! – Steve –