Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!bloom-beacon!husc6!bbn!uwmcsd1!ig!agate!ucbvax!decwrl!nsc!voder!apple!dan
From: dan@Apple.COM (Dan Allen)
Newsgroups: comp.sys.mac.hypercard
Subject: Re: Global variables from XCMD/XFCN
Message-ID: <12600@apple.Apple.COM>
Date: 21 Jun 88 17:55:06 GMT
References: <4432@zodiac.UUCP>
Reply-To: dan@apple.apple.com.UUCP (Dan Allen)
Organization: Apple Computer Inc, Cupertino, CA
Lines: 17

In article <4432@zodiac.UUCP> pkahn@ads.com (Phil Kahn) writes:
>Problem is, the Language Guide states that XCMD/XFCN cannot use global
>variables.  Though globals are sloppy, they are sometimes justified.
>For example, I want to drive a digitizer board from hypercard.  There
>is board base address and status information that is best kept global
>without explicit reference from hypercard.  How can I do this?  Or do
>I need to pass pointers back to hypercard.  Since hypercard wants
>strings, I'd have to coerce to string and back to pointer on the next
>call.  It seems this would only work for pointers to scalars. I can't
>see how pointers to records/structs would work from the hypercard side.

XCMDs currently do not have their own A5 World, which means that they do
not have a jump table (no code segmentation) and they do not have global
data.  Sorry.

Dan Allen
Apple Computer