Re: Learning programming - where and how to start?

From: Nick Landsberg (hukolau_at_NOSPAM.att.net)
Date: 04/23/04


Date: Fri, 23 Apr 2004 16:15:05 GMT

Mel Wilson wrote:
> In article <4088d071$0$134$edfadb0f@dread11.news.tele.dk>,
> "Michael Jørgensen" <ingen@ukendt.dk> wrote:
>
>>"Noah Roberts" <nroberts@dontemailme.com> wrote in message
>>news:kqqdna-tn4tttBrd4p2dnA@scnresearch.com...
>>
>>
>>>3) It is much harder to distinguish which if an else is for when there
>>>are no end deliminators.
>>
>>On the contrary. It is completely unambiguous given the identation. If you
>>had to rely on (mis-indented) delimiters it would be much harder to see
>>(with the eye).
>
>
> :-) ran into this the other day:
>
>
> if (BufferCopy.wIndex == 0);
> {
> EP0_start = ReportDescriptor1;
> EP0_end = EP0_start + sizeof (ReportDescriptor1);
> ...
>

That's classic and hard to find. Also, along the same line
is one which I found years ago (pasting somewhat modified
version of the code above):

      if (BufferCopy.wIndex == 0)
          EP0_start = ReportDescriptor1;
          EP0_end = EP0_start + sizeof (ReportDescriptor1);
...

One hopes that modern development environments help
to catch both of these, but that may be a forlorn
hope.

>
> No clarifying comments or anything. What *did* they mean?
>
>
> Regards. Mel.

-- 
"It is impossible to make anything foolproof
because fools are so ingenious"
  - A. Bloch