Sujet : Re: Two questions on arrays with size defined by variables
De : janis_papanagnou+ng (at) *nospam* hotmail.com (Janis Papanagnou)
Groupes : comp.lang.cDate : 10. Feb 2025, 03:35:18
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vobol8$ts5l$1@dont-email.me>
References : 1 2 3 4 5 6
User-Agent : Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0
On 10.02.2025 01:38, Keith Thompson wrote:
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> writes:
>
If I'd knew the audience is picky I'd posted the whole test program;
but then there's even much more picky comments to expect. ;-)
Yeah, we're picky here.
I hope to mollify the audience if I point out that my code actually
looks *like* this
>
...
int main (int argc, char * argv[])
{
...
return 0;
}
>
(And, yes, I know that the "..." is not correct, and argc is unused,
and I omitted 'const', etc.)
It's clear enough that the "..." is figurative.
And my main() { ... } was to figuratively illustrate the structure.
I could have also used f() { ... } but it didn't occur to me that
using main would trigger yet another off-topic comment.
As picky as I am, I wouldn't have commented on it.
Some are more picky some less, some on this detail others on that.
I think we're all well served if we'd be more equanimous especially
when postings or clarifying things are based on _excerpts_ or code
snippets.
I know that specifically in _this_ newsgroup that is difficult. :-)
"// ..." or "/* ... */" is more
pedantically correct, but whatever.
But this is code. The meta '...' is clearly descriptive for some
[contextually uninteresting] things omitted.
(You see what I mean by trying to be more equanimous. Perception
of folks differs a lot. We cannot expect others to share our views
or habits.)
(Incidentally, Perl has a "..." operator, nicknamed the Yada Yada
operator, intended to mark placeholder code that is not yet
implemented.)
The "return 0;" is unnecessary but harmless in C99 and later.
That - returning a value when a function is declared to return
one - is actually a [maybe picky] coding-habit of mine. :-)
Janis