Sujet : Re: Buffer contents well-defined after fgets() reaches EOF ?
De : Keith.S.Thompson+u (at) *nospam* gmail.com (Keith Thompson)
Groupes : comp.lang.cDate : 10. Feb 2025, 07:41:36
Autres entêtes
Organisation : None to speak of
Message-ID : <87h652pahr.fsf@nosuchdomain.example.com>
References : 1 2 3 4 5 6 7 8 9
User-Agent : Gnus/5.13 (Gnus v5.13)
Janis Papanagnou <janis_papanagnou+
ng@hotmail.com> writes:
On 10.02.2025 05:37, Keith Thompson wrote:
[...]
This is already off-topic, so I won't even mention tabs vs. spaces.
>
But as Vim users we don't have any issues here; as long as the
indentation is _visibly_ consistent we can fix any tab/space-mix
on the fly and easily with Vim.
Yes, *if* the indentation is visibly consistent.
At a previous job, I reviewed an update whose apparent meaning
differed depending on whether the editor was configured with 4- or
8-column tabstops. I don't remember the exact details, but the code
looked like either:
if (condition)
statement1;
statement2;
or:
if (condition)
statement1;
statement2;
depending on the reader's settings. Of course they're semantically
equivalent, but the first is the way the developer saw it, and the
second is misleading and is the way it looked to me.
This kind of thing is why I use only spaces for indentation and curly
braces even when there's only one statement in the block (unless I'm
working under a coding standard that says otherwise).
-- Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.comvoid Void(void) { Void(); } /* The recursive call of the void */