Re: comp.lang.c Answers (Abridged) to Frequently Asked Questions (FAQ)



On 2005-12-15, Mark McIntyre <markmcintyre@xxxxxxxxxxx> wrote:
>>> 17.1: What's the best style for code layout in C?
>>>
>>> A: There is no one "best style," but see the full list for a few
>>> suggestions.
>>
>>Yes there is.
>
> This is a religious issue, if you want to make serious comments about
> the FAQ, steer clear of such points. To do otherwise risks starting a
> religious war about the most trivial of your comments... :-(

I was just noting that the full list only actually offers one
suggestion, maybe two [it makes a passing mention of indian hill, which
i haven't looked at to see if it differs meaningfully from K&R] -
certainly nothing like giving equal time to, for example, the GNU style,
which while I personally dislike it, it is well-specified and has a huge
volume of code.

[Modified to quote the full answer - you snipped the part I was replying
to.]
>>> 20.32: Is (year % 4 == 0) an accurate test for leap years?
>>>
>>> A: No, it's not accurate (and yes, 2000 was a leap year).
>>> The full expression for the present Gregorian calendar is
>>>
>>> year % 4 == 0 && (year % 100 != 0 || year % 400 == 0)
>>>
>>> See a good astronomical almanac or other reference for details.
>>> (To forestall an eternal debate: references which claim the
>>> existence of a 4000-year rule are wrong.) See also question
>>> 13.14.
>>
>>the next 1994 years and two-and-a-half months is a long time, so
>>worrying about whether such a rule will or will not have been instituted
>>by then is meaningless.
>
> You obviously aren't an astronomer.

All I know is, the solar year is, according to units(1), 365.242198781
days. The gregorian year is 365.2425 days. this is a difference of about
1.2 days in 4000 years. Adding a rule that one year in 4000 is not a
leap year would change the fraction to, I believe, 365.24225. Whether or
not it's justified by the astronomy, it's, with the numbers i can find,
justified by the math. The only thing that the list's claim that there
is no 4000 year rule has going for it is the fact that no such rule has
actually been declared at the present time.

If the answer were as clear-cut as you seem to think it is, there
wouldn't BE references which claim there either is or ought to be such a
rule.

My point was merely that it's not worth accounting for a possible 4000
year rule because it's so far in the future [we're talking millennia,
not decades as with Y2K] and, of course, hasn't yet been settled on.

[whether the length of the day is long-term stable enough to justify
such a rule, on the other hand, I have no clue about. there are tidal
effects to take into account slowing down the earth's rotation.]
.



Relevant Pages

  • Re: Know your analemma from a hole in the ground
    ... rotation period of one sidereal day, ... affirming that there is no isolated external reference for daily ... does your specific arrangement of reasoning ... while the astronomer acknowledges that there is no external reference ...
    (sci.astro.amateur)
  • Re: Article on Herbert Schildt, author of C Unleashed, repaired on wikipedia
    ... An obvious candidate for the more knowledgeable is const. ... One that does not justify a persecution ... programmer needs when s/he looks it up in a reference book. ... and *a fortiori* it does not justify the attacks on ...
    (comp.programming)
  • Re: simple question about ref with object?? PLEASE HELP
    ... the exception occurs in the function. ... posting here it is obviously not serious enough to justify your tone. ... code is generating the null reference exception. ... exception (unless, of course, the FillColumns() method at some point sets ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: generalizations
    ... making a generalization. ... I guess you are not going to justify your assertion by any direct ... reference to what I wrote. ...
    (soc.atheism)
  • Re: Why I oppose seatbelt and helmet laws
    ... the ends don't justify the means. ... Not a distinctively libertarian aphorism. ... I like how you added the qualifier "by reference". ... sole justification for the seat belt laws the "effectiveness" of the two ...
    (alt.sports.football.pro.ne-patriots)