[futurebasic] Re: [FB] Bad DCOD call

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 1999 : Group Archive : Group : All Groups

From: Mark Goodes <wave@...>
Date: Thu, 13 May 1999 18:59:08 -0400
>I eventually (after too many hours in front of my G3) managed to fix the
>problem (at least for now)
>
>I don't know how to explain what I did but I now know what I need to do to
>keep the DCOD and calling app happy (I think?)
>
>All I know is that it relates to where the shared globals memory is defined.

Shared globals?  Sorry, there ain't no such thing.  It works like this:
1.  You have your globals file that gives the names of all your globals.
2.  In your main app, FB creates a memory block for globals and uses your
globals file to keep track of them.
3.  In your DCOD, FB creates a brand new memory block and uses your
self-same globals file to keep track of them (I'm assuming that this is
what you told FB to do).  So if you have a global such as testGlobal it
will reside in different places in memory in your app and in the DCOD.  You
can test this as follows:
-in your app, type testGlobal=1
-in your DCOD, type PRINT testGlobal, and call it from your app.
I'll be surprised if you don't get a zero.

If you want to share globals, you have to pass them in the same way that
you pass records.  Either that, or you need to play with registers a4 and
a5, which can be messy.

HTH
Mark

____________
wave (Toronto, Canada)