E
Espen Myrland
Joona I Palaste said:Espen Myrland
This would have been funnier if *cough* was proper syntax for a C type.
Yess. I know. I first removed it and then put it back.
regards,
Joona I Palaste said:Espen Myrland
This would have been funnier if *cough* was proper syntax for a C type.
Correct, there are no errors in that statement. The error is in your
compiler, and the code snippet is one way to fix it (altering the
variables to suit).
Hint: is one plural?
Chris: Jacob's (*cough*) reply hasn't hit my server yet, so thanks
for setting him straight.
Sometimes I despair of humanity, I really do.
Bart said:Took me a while to get your point. However I think that is a little unfair.
I'm using an MS OS which (with their thousands of staff and tens of billions
of pounds) is still sprinkled with "1 Files", "1 Folders" and so on. Maybe
the idea of having just ONE file might be alien to them.
My own efforts are better behaved but sometimes dealing with multi-languages
means plurals are not that straightforward. But no excuse for MS though.
Bart
Took me a while to get your point. However I think that is a little unfair.
I'm using an MS OS which (with their thousands of staff and tens of billions
of pounds) is still sprinkled with "1 Files", "1 Folders" and so on.
I rest my case said:Maybe
the idea of having just ONE file might be alien to them.
My own efforts are better behaved but sometimes dealing with multi-languages
means plurals are not that straightforward. But no excuse for MS though.
Well, yesssssss, the customer is always right but now my compiler
says:
0 error, 1 warning
It should be
0 errors, 1 warning isn't it?
Or should I drop the message if there is only one
error? Actually it doesn't make sense to summarize
the error/warning count when there is only one isn't it?
Chris Croughton said:They've done it since early PCDOS times, when often there was only one
file on the floppy...
Yes, i18n is more of a problem. The solution is similar, though, you
just need to put the whole words in the conditionals:
printf("%d %s\n", number,
number == 1 ? gettext("file") : gettext("files"));
(or something like that).
Chris said:[...]
Yes, i18n is more of a problem. The solution is similar, though, you
just need to put the whole words in the conditionals:
printf("%d %s\n", number,
number == 1 ? gettext("file") : gettext("files"));
Chris said:but Unix-like utilities have traditionally not displayed anything at all
for 'success', only for failure (except of course for utilities the
purpose of which is to produce output to the user).
[...] it took me a while to get your point...
Well, yesssssss, the customer is always right but now my compiler
says:
0 error, 1 warning
Chris said:The message "1 errors" and friends is one of my bugbears, it indicates
to me that the code is not production quality (it's those
little touches which make the difference in Real World(tm) programs
between being bought and being ignored).
CBFalconer said:They closely resemble flies gathering around a dead fish.
It might mean that the author needs to translate the error messages
automatically with something like gettext (more precisely, switch
automatically between multiple human-written translations) and can't sensibly
do plurals without wasting too much of his time on what is, in the end, a
very minor issue.
Correct. In most western European languages at least the only singular
number is one, zero is regarded as gramatically plural (I don't know
much about middle- and far-eastern languages, nor about those native to
the American and Pacific areas).
<OT>
Most W.E. languages except English have a construct which translates as
"isn't it?" which is often appended to sentences: "n'est pas", "nicht
wahr", etc. English seems to have largely dropped that construct...
</OT>
lcc-win32 doesn't print anything if there are no errors
and no warnings. The objective is when you have a lot of
warnings but no errors to avoid having to look up all the
output to see if there is an error...
OK now it is:
if (errcnt > 0 || warningCount > 0) {
printf("%d error%s, %d warning%s", errcnt,
(errcnt != 1) ? "s" : "",
warningCount, warningCount != 1 ? "s":"");
}
Small improvement but wothwhile.
Thanks for the tip
Long ago my Latin teacher grew impatient with our
constant grumbling at trying to memorize the ten forms
of every noun, thirty forms of every adjective, and 120-odd
forms of every verb. We didn't know how lucky we were,
said he, because if we'd been studying Greek the job would
have been roughly fifty percent harder. Whenever a Latin
word had singular and plural forms, Greek had singular and
dual (exactly two) and plural (three or more) forms ...
Q1: Can any Greek speakers vouch for my old Latin
teacher's assertion? (He may have been kidding us.)
Q2: If I mistake not, gettext() would have a hard
time with this situation because the mapping of distinct
dual and plural Greek words to a single English plural
would be non-invertible.
jacob said:lcc-win32 doesn't print anything if there are no errors
and no warnings. The objective is when you have a lot of
warnings but no errors to avoid having to look up all the
output to see if there is an error...
OK now it is:
if (errcnt > 0 || warningCount > 0) {
printf("%d error%s, %d warning%s", errcnt,
(errcnt != 1) ? "s" : "",
warningCount, warningCount != 1 ? "s":"");
}
According to my handy Greek textbook, the dual form is "obsolescent
in classical Greek, though frequent in Homer". I'm not sure what
exactly they mean by "classical Greek" here.
CBFalconer said:jacob navia wrote: [...]OK now it is:
if (errcnt > 0 || warningCount > 0) {
printf("%d error%s, %d warning%s", errcnt,
(errcnt != 1) ? "s" : "",
warningCount, warningCount != 1 ? "s":"");
}
I would avoid all that foofaraw with:
if (errcnt || warningCount)
printf("Errors : %d, Warnings : %d\n" errcnt, warningCount);
EOGH (end of grammar hassles)
Thomas Stegen said:Are you saying that the regulars here are dead fish?
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.