Path: news.cs.au.dk!not-for-mail From: Alejandro Villanueva <190921@cepsz.unizar.es> Newsgroups: comp.lang.beta Subject: Re: Am I missing something obvious Date: 24 Oct 2000 09:24:06 -0000 Organization: University of Aarhus, Department of Computer Science (DAIMI) Lines: 117 Approved: mailtonews@cs.au.dk Distribution: world Message-ID: <20001024092406.22334.qmail@noatun.mjolner.dk> Reply-To: Alejandro Villanueva <190921@cepsz.unizar.es> NNTP-Posting-Host: cs.au.dk X-Trace: gjallar.cs.au.dk 972379455 5790576 130.225.16.1 (24 Oct 2000 09:24:15 GMT) X-Complaints-To: usenet@cs.au.dk NNTP-Posting-Date: Tue, 24 Oct 2000 09:24:15 +0000 (UTC) Xref: news.cs.au.dk comp.lang.beta:12615 --------------1DA993BD7F44B08CB1F38DB8 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Well, I noticed that too, and thought the way the Beta book does was Ok... but I do like you: I never write the "&" and it works... I don't know why! If anyone knows, please, tell us... ;-) Alex. Atle wrote: > I have been (sucessfully :-) creating lots of little Beta-programs now for a while. > Sweet little thingies, but not doing much useful work :-) > So, before embarking on the great Bet-hack, I wanted to read the Betabook again. > And then I saw lots of things that I had forgotten: > > sample: > (# > i, j : @INTEGER; > > proc: > (# > ENTER j > DO j +1 -> i > EXIT i > #) > #) > > Not very useful, but I see that the Betabook call the proc like this > > 1 -> &sample.proc > > and explains that the & executes the proc patterns, and had I used &proc[] then it would not have been executed, but created and a > reference returned. > > I find this completely logical and OK. > But, I went back to my sample programs, and noticed that I had forgotten the & in front of every procedure and function pattern I > had written, and they all work as expected. > > So my question is: Have I overlooked somethng obvious? > Are my programs wrong, and if they are, why do they work? > > I know this is a potentially idiotic question, but I have gathered the courage for weeks now to ask it, so please be kind :-) > > -- > Best wishes, Atle > > users.skynet.be/atle -- ------------------------------------------------------ ¿Quieres Cobrar por Navegar en Internet? Visita: http://www.navegana.com/dinero/flintstone.html ------------------------------------------------------ Alejandro Villanueva 190921@cepsz.unizar.es ------------------------------------------------------ --------------1DA993BD7F44B08CB1F38DB8 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit Well, I noticed that too, and thought the way the Beta book does was Ok... but I do like you: I never write the "&" and it works... I don't know why! If anyone knows, please, tell us... ;-)
Alex.
Atle wrote:
I have been (sucessfully :-) creating lots of little Beta-programs now for a while.
Sweet little thingies, but not doing much useful work :-)
So, before embarking on the great Bet-hack, I wanted to read the Betabook again.
And then I saw lots of things that I had forgotten:sample:
(#
i, j : @INTEGER;proc:
(#
ENTER j
DO j +1 -> i
EXIT i
#)
#)Not very useful, but I see that the Betabook call the proc like this
1 -> &sample.proc
and explains that the & executes the proc patterns, and had I used &proc[] then it would not have been executed, but created and a
reference returned.I find this completely logical and OK.
But, I went back to my sample programs, and noticed that I had forgotten the & in front of every procedure and function pattern I
had written, and they all work as expected.So my question is: Have I overlooked somethng obvious?
Are my programs wrong, and if they are, why do they work?I know this is a potentially idiotic question, but I have gathered the courage for weeks now to ask it, so please be kind :-)
--
Best wishes, Atleusers.skynet.be/atle
-- ------------------------------------------------------ ¿Quieres Cobrar por Navegar en Internet? Visita: http://www.navegana.com/dinero/flintstone.html ------------------------------------------------------ Alejandro Villanueva 190921@cepsz.unizar.es --------------------------------------------------------------------1DA993BD7F44B08CB1F38DB8--