GetNumberFormat: not used by the Microsoft CRT....

by Michael S. Kaplan, published on 2005/08/21 21:30 -04:00, original URI:

Serge Wautier asked:

I just blogged about GetNumberFormat() and why it may be confusing to users.

It led me to wonder why GetNumberFormat() is not used by the CRT, such as in printf-like functions, even though GetDateFormat() is used by the same CRT.

Do you know why ? Is there any tricky answer or is it just because of general "backward compatibility" as I described in my post ?



A fascinating question, but one I do not really know the answer to!

If I had to guess, I would think that the differences between number formatting and date formatting (i.e. that date formatting is mostly based on format strings, while number formatting is not based on them at all), since the method used for number formatting is harder to integrate into the parsing algorithms that are used by the C runtime. But that is 100% speculation without any real knowledge of why the difference in behavior might exist.

But I thought I would put it up here in case any of the CRT folks might want to weigh in with an answer? I know a couple of them frequent this blog, perhaps one of them knows the backstory here....

# Serge Wautier on 22 Aug 2005 2:56 AM:


Thanks for your comments. I look forward to reading reactions from the CRT folks.


go to newer or older post, or back to index or month or day