Path: news.daimi.aau.dk!news-b.uni-c.dk!news-inn.uni-c.dk!news.uni-c.dk!nntp-oslo.UNINETT.no!nntp-trd.UNINETT.no!sn.no!nntp.uio.no!nntp.zit.th-darmstadt.de!fu-berlin.de!zrz.TU-Berlin.DE!news From: Kai Petzke Newsgroups: comp.lang.beta Subject: Re: Redefinition of attributes in BETA (Q) Date: Fri, 11 Oct 1996 16:07:17 +0200 Organization: Technical University Berlin, Germany Lines: 30 Message-ID: <325E5495.41C6@idefix.physik.tu-berlin.de> References: <325B9F88.1C10@informatik.uni-stuttgart.de> NNTP-Posting-Host: foxylady.physik.tu-berlin.de Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Mailer: Mozilla 2.0 (X11; I; IRIX 5.2 IP20) Bernd Holzmueller wrote: > E.g., is it allowed to write > > V: (# A: @Integer; #) > > W: V (# A: @Real; #) Yes. Whenever you access W.A, you will get the Real value, when you access V.A, you will get the Integer value. > and does then the W pattern look like > > (# A: @Integer; A: @Real; #) ? Yes, except that the first A is inaccessible by direct means. However, it can be accessed by using a reference to a type, where the second A has not yet been defined: (# p1: ^V; p2: @W; do p2.A; (* accesses the Real value in W *) p2[]->p1[]; p1.A; (* accesses the Integer value, that is both in V and W *) #) Kai