Path: news.cs.au.dk!not-for-mail From: Daniel Bonniot Newsgroups: comp.lang.beta Subject: Re: procedure call Date: 20 Jul 1999 09:19:44 -0000 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 35 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <19990720091944.15157.qmail@noatun.mjolner.dk> Reply-To: Daniel Bonniot NNTP-Posting-Host: daimi.cs.au.dk X-Trace: xinwen.cs.au.dk 932462398 6001909 255.255.255.255 (20 Jul 1999 09:19:58 GMT) X-Complaints-To: news@cs.au.dk NNTP-Posting-Date: 20 Jul 1999 09:19:58 GMT Xref: news.cs.au.dk comp.lang.beta:12035 Yoann Padioleau wrote: > > nospam2159@cs.au.dk (Peter von der Ahé) writes: > > Excuse me for all the erros i made. This is what i mean : > (# > > A: (# > attribute : @ ingeger; > method : (# ... #) > #); > toto : @A; > do > 1 -> toto.attribute; > 2 -> toto.method (* ??? *) > #) > I think the problem is that there is an implicit object creation here. when you write 2 -> toto.method the real meaning is : 2 -> &(toto.method) (* parenthesis just there to show how it is parsed, shouldn't be necessary *) That is, allocate a new object whose pattern is toto.method, and pass 2 to its enter part. It should typecheck as long as method takes an integer in its enter part. This issue about automatic object creation must have appeared before, have you checked the FAQ ? If I remember well, it's is not in the Beta language specification but a feature of the Mjolner Beta System. Daniel Bonniot