Re: Current coding standard documentation
- From: "Wayne Niddery [TeamB]" <wniddery@xxxxxxxxxxxxxx>
- Date: Wed, 1 Nov 2006 10:38:24 -0500
Chris Burrows wrote:
//
How would you write this in Delphi so that it is less confusing?
Which 'if' does the second 'else' belong to?
if x = 1 then begin
end else if y = 5 then//
begin
end//
else begin
end;
Why is there any confusion here? The formatting could be a bit mroe
consistent:
if x = 1 then
begin
//
end
else if y = 5 then
begin
//
end
else
begin
//
end;
But I don't see how one would not know the last Else goes with the
immediately prior If.
--
Wayne Niddery - Winwright, Inc (www.winwright.ca)
"Reality is that which, when you stop believing in it, doesn't go
away." ? Philip K. Dick
.
- References:
- Re: Current coding standard documentation
- From: Serge Dosyukov \(Dragon Soft\)
- Re: Current coding standard documentation
- From: Chris Burrows
- Re: Current coding standard documentation
- From: Nick Hodges (Borland/DTG)
- Re: Current coding standard documentation
- From: Chris Burrows
- Re: Current coding standard documentation
- Prev by Date: Re: Kylix Survey
- Next by Date: Re: Kylix Survey
- Previous by thread: Re: Current coding standard documentation
- Next by thread: Re: Current coding standard documentation
- Index(es):
Relevant Pages
|