From: Jeffrey Carter <spam@spam.com>
Subject: Re: Mneson announcement and help request
Date: Thu, 03 Jun 2004 04:12:39 GMT
Date: 2004-06-03T04:12:39+00:00 [thread overview]
Message-ID: <Xyxvc.19956$Tn6.3068@newsread1.news.pas.earthlink.net> (raw)
In-Reply-To: <c9l0vo$pq3$1@sparta.btinternet.com>
Martin Dowie wrote:
> Standard idiom: MAA Idiom:
>
> while not End_Of_File (Current_Input) begin
> loop loop
> Get_Immediate (C); Get_Immediate (C);
> end loop; end loop;
> exception
> when End_Error =>
> null; -- End of file
> end;
The standard idiom should be
loop
exit when End_Of_File (Current_Input);
Get_Immediate (C);
end loop;
which eliminates the calls to "not". In addition, it uses positive
logic, rather than the negative logic required by while, which is easier
to read and understand.
--
Jeff Carter
"You couldn't catch clap in a brothel, silly English K...niggets."
Monty Python & the Holy Grail
19
next prev parent reply other threads:[~2004-06-03 4:12 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-06-01 15:56 Mneson announcement and help request Marius Amado Alves
2004-06-02 2:26 ` Jeff C,
2004-06-02 3:06 ` Marius Amado Alves
2004-06-02 11:19 ` Georg Bauhaus
2004-06-02 11:41 ` Marius Amado Alves
[not found] ` <c9l0vo$pq3$1@sparta.btinternet.com>
2004-06-02 17:47 ` Marius Amado Alves
2004-06-02 19:46 ` Martin Dowie
2004-06-02 22:10 ` Randy Brukardt
2004-06-03 5:58 ` Martin Dowie
2004-06-04 3:21 ` Randy Brukardt
2004-06-04 5:55 ` Martin Dowie
2004-06-04 7:30 ` Jean-Pierre Rosen
2004-06-04 14:11 ` Larry Kilgallen
2004-06-03 4:12 ` Jeffrey Carter [this message]
2004-06-03 5:48 ` Martin Dowie
2004-06-03 9:02 ` Martin Krischik
2004-06-02 11:41 ` Georg Bauhaus
2004-06-02 13:14 ` Marius Amado Alves
2004-06-03 4:09 ` Jeffrey Carter
2004-06-03 11:24 ` Georg Bauhaus
2004-06-02 3:21 ` Marius Amado Alves
2004-06-22 20:49 ` Jacob Sparre Andersen
2004-06-23 9:36 ` Marius Amado Alves
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox