Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!ucbvax!mtxinu!taniwha!paul From: paul@taniwha.UUCP (Paul Campbell) Newsgroups: comp.lang.misc Subject: Re: Algol68 Message-ID: <812@taniwha.UUCP> Date: 10 Apr 91 00:01:26 GMT References: <9168@castle.ed.ac.uk> <4202@zaphod.UUCP> <801@taniwha.UUCP> <4217@zaphod.UUCP> <809@taniwha.UUCP> Reply-To: paul@taniwha.UUCP (Paul Campbell) Organization: Taniwha Systems Design, Oakland Lines: 43 In article chl@cs.man.ac.uk (Charles Lindsey) writes: >In <809@taniwha.UUCP> paul@taniwha.UUCP (Paul Campbell) writes: > >> union([]int , struct (int a, b, c)) fred = (1,2,3); > >Not so. For this to be allowed, "(1,2,3)" would have to be a > strong-UNITED-unit [4.4.1.c,d,5.2.1.c] >where 'UNITED' is the particular union in question. >This, in turn, would have to be a > strong-UNITED-ENCLOSED-clause [3.2.1.d,5.1.A,B,C,D] >or, more specifically, a > strong-UNITED-collateral-clause [1.2.2.A] >BUT, there is no such animal [3.3.1.d,e] > >The point is that ENCLOSED-clauses cannot be coerced (you can only coerce >the things inside them). OK, I'm beat :-) I finally figured out where this happens - it's really because: PRIMARY:: ENCLOSED clause [5D] rather than: PRIMARY:: ENCOLSED clause coercee (all the other productions in this section end in coercee). Early on while I was working on my compiler I read someone describe this as being aproblem with the report, when I got to that part of the compiler (coercing displays etc) it all seemed to make sense. So how do you initialise a union with a row display?? Do you have to put it in a temporary variable first?? ugh Paul -- Paul Campbell UUCP: ..!mtxinu!taniwha!paul AppleLink: CAMPBELL.P "But don't we all deserve. More than a kinder and gentler fuck" - Two Nice Girls, "For the Inauguration"