Path: news.daimi.aau.dk!jlk From: jlk@daimi.aau.dk (J|rgen Lindskov Knudsen) Newsgroups: comp.lang.beta Subject: Re: Constants in Beta Date: 26 Apr 1995 12:11:05 GMT Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 57 Message-ID: <3nld8p$cl1@belfort.daimi.aau.dk> References: <3n1mdi$6h3@pulm1.accessone.com> <3n3ifc$5n@pulm1.accessone.com> Reply-To: jlknudsen@daimi.aau.dk (Jorgen Lindskov Knudsen) NNTP-Posting-Host: lithium.daimi.aau.dk In <3n3ifc$5n@pulm1.accessone.com> Thus spake Baiss E. Magnusson : >In following up on how to do constants in Beta, I looked at file > which looks like it does what I want. So I started >writing the following code shown below, which I put in file > ! >However, it fails to build successfully ( as shown by the error at the >bottom), and in fact the same thing happens when I try to build >! >What should the be, for this kind of file? >Is this strategy correct? And if so what do I need to do to include this >fragment in all my source files? >******************* >ORIGIN '~beta/maclib/v2.8/maclib' >[[ >--- LIB : attributes --- >(# > PASTE_ID : (# exit 5 #); > CLEAR_ID : (# exit 6 #); >#); >---]] I would propose the following structure: In file IDconstants.bet: ORIGIN '~beta/basiclib/v1.4/betaenv [[ --- LIB : attributes --- (# PASTE_ID : (# exit 5 #); CLEAR_ID : (# exit 6 #); (* and definition of other related constants *) #); ---]] Alle files, that needs access to these constants, would then have the structure: ORIGIN '(*somewhere*)' [[ --- INCLUDE 'IDconstants' --- --- program: descriptor --- (# (* do something like *) (PASTE_ID, 127)->theWindow.doPaste (* etc. *) #) -- Jorgen Lindskov Knudsen, Computer Science Department, Aarhus University Ny Munkegade 116, DK-8000 Aarhus C, DENMARK E-mail: jlknudsen@daimi.aau.dk, Phone: +45 89 42 32 33, Fax: +45 89 42 32 55