Re: [C] loop termination question
From: Curley Q. (curleyq_at_bogus.net)
Date: 08/07/04
- Next message: Gary Labowitz: "Re: Why does isprime((int n) work?"
- Previous message: Russell Hanneken: "Re: a question about classes"
- In reply to: Jerry Coffin: "Re: [C] loop termination question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sat, 07 Aug 2004 18:19:49 GMT
Jerry Coffin wrote:
> "Curley Q." <curleyq@bogus.net> wrote in message news:<411428EB.7090701@bogus.net>...
>
> [ ... ]
>
>
>>>while ( (c=fgetc(infile) != EOF)
>>
>>Thanks. After giving it a little more thought, this is what I
>>ended up doing. BTW, you're short a parenthesis in the above
>>expression, but who's counting?
>
>
> Oops -- you're quite right. My apologies (or is this where I'm
> supposed to pull out one of those lines about wanting to check that
> you were really reading what I posted? :-)
Nah. Only Francis Glassborrow does that. Just kidding, Francis;
just kidding.
>
> [ ... ]
>
>
>>> linecount += (c == '\n');
>>
>>Is this idiomatic? :-)
>
>
> By whose definition of "idiom"?
>
> "Idiom" has a number of definitions that are similar when applied to
> natural languages, but become substantially different when applied to
> programming languages.
>
> Specifically, an idiom is an expression that is understood by native
> speakers of the language. This is often used to mean something that
> can ONLY be understood by a more or less native speaker of the
> language -- specifically, an expression whose overall meaning can't be
> inferred from the meanings of the words that make it up (e.g. "cool"
> to mean all manner of things unrelated to temperature).
>
> I'd say anybody who knows C well should be able to figure out what
> this means, though it might take some a little though. One of the
> fundamental differences between programming languages and natural
> languages is that in programming there's no such thing as an idiom by
> the second definition -- a properly functioning computer always
> follows definitions of things exactly as they're given to it, and no
> matter how complex an expression gets, it's always possible to deduce
> its meaning as a composition of the individual components (and, in
> fact, a parser does exactly that).
>
> (How's that for a typically programmer-like response, of giving a
> long, dull and all-too-serious answer to a light-hearted question?)
>
A virtuoso performance, to be sure.
- Next message: Gary Labowitz: "Re: Why does isprime((int n) work?"
- Previous message: Russell Hanneken: "Re: a question about classes"
- In reply to: Jerry Coffin: "Re: [C] loop termination question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|