Path: news.daimi.aau.dk!news.uni-c.dk!sunic!sunic.sunet.se!uunet!news.mathworks.com!udel!news.sprintlink.net!pulm1.accessone.com!usenet From: Baiss E. Magnusson Newsgroups: comp.lang.beta Subject: Globals & External C Lib Date: 29 Apr 1995 21:12:50 GMT Organization: PDI Lines: 46 Distribution: world Message-ID: <3nua4i$2o5@pulm1.accessone.com> NNTP-Posting-Host: 204.118.152.121 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Newsreader: Nuntius 2.0_68K X-XXDate: Sat, 29 Apr 1995 22:11:47 GMT I'm not clear on how to set up the Beta code to make a call to an external 'C' library routine that wants the address of a variable passed ( i.e. call by reference rather than call by value). Just a simple example of a 'C" routine that uses the address of an would suffice. As in the call to below: Also, I would like to group all globals variables in a single class, but one of the errors I get is: myGlobals: @GlobarVars ***** Only pattern-declarations may appear in a fragment of category 'attributes' ****************** I heve in fragment ****************** myGlobals: @GlobarVars; GlobarVars: (# boardType : @ExternalRecord; actualVidParms : @VidParamStruct; displayBaseAddr : @integer; (* physical address of display memory *) ....... #); ...... ConnectIMAXX:external (# do callC #); GetIMAXXType:external (# bType: @shortInt; enter bType.ptr do callC; exit bType #); ...... InitGrabber: (# do ConnectIMAXX; myGlobals.boardType -> GetIMAXXType->myGlobals.boardType; (* ??????? *) ...... #) ****************** Then in the main program: ****************** do globvar[] -> initToolbox; SetUpMenus; (windowId,0,-1) -> getNewWindow -> myWindow -> setPort; InitGrabber; .....