Newsgroups: comp.lang.beta Path: news.daimi.aau.dk!news-feed.inet.tele.dk!www.nntp.primenet.com!nntp.primenet.com!EU.net!CERN.ch!news From: Maciej MACOWICZ Subject: Re: constant & private attributes X-Nntp-Posting-Host: sual06.cern.ch Content-Type: text/plain; charset=us-ascii Message-ID: <32931275.7FE1@cern.ch> Sender: news@news.cern.ch (USENET News System) Content-Transfer-Encoding: 7bit Organization: CERN. European Lab. for Particle Physics References: <3292E2B6.41C67EA6@cs.kuleuven.ac.be> Mime-Version: 1.0 Date: Wed, 20 Nov 1996 14:15:17 GMT X-Mailer: Mozilla 3.01Gold (X11; I; SunOS 5.5.1 sun4m) Lines: 30 Xref: news.daimi.aau.dk comp.lang.beta:10887 Walid Al-Ahmad wrote: > > Hello evreybody, > > I have the following two questions for which I do not, directly, find > answer in the book of Madsen et al. : > 1) How can I define constant (integer, real, ..) attributes in Beta ? > How is PI defined in the math library for example ? Yes, you can define the constants, eg: PI:(# exit 3.14159 #) > 2) Is it possible to manipulate attributes outside the pattern ? Are > they read-only variables like Eiffel's attributes ? Can I do something > like this : > A : (# x :@integer; ... #) > a : @A; 3->a.x ||| You can, it is correct. Hope this helps Cheers Maciej -- ______________________________________________________________________ Maciej Macowicz CERN, ECP/ALD phone: (41) 22 767 23 82