Antoninus Twink <nospam@nospam. invalidwrites:
On 9 May 2008 at 5:32, Richard Heathfield wrote:
>
He added a syntax error in the if line, and gave the OP an example of
hideous C style: his idiotic inistence on one-line if statements that
makes code hard-to-read and debugging even harder, plus a completely
vacuous comment.
>The OP replied to the above, quoting a little of it, and then Chuck replied
>to that reply:
>>
>I'm curious to know what information Chuck thinks he added here.
>to that reply:
>>>
>> if (tmp = realloc(bp, sizeof book) bp = tmp; /* ok, update */
>> else {
>> /* tmp == NULL, realloc failed, do whatever is needed */
>> /* Note that the original content of *bp still exists */
>> }
>> if (tmp = realloc(bp, sizeof book) bp = tmp; /* ok, update */
>> else {
>> /* tmp == NULL, realloc failed, do whatever is needed */
>> /* Note that the original content of *bp still exists */
>> }
>I'm curious to know what information Chuck thinks he added here.
He added a syntax error in the if line, and gave the OP an example of
hideous C style: his idiotic inistence on one-line if statements that
makes code hard-to-read and debugging even harder, plus a completely
vacuous comment.
this style would not be allowed on my projects. It is horrible and very
amateur. Possibly Chuck is a new C programmer and learning though it is
better to be patient.
Leave a comment: