Re: Are _T() and TEXT() macros equivalent?



"Mihai N." <nmihai_year_2000@xxxxxxxxx> wrote in message
news:Xns991223EABEAMihaiN@xxxxxxxxxxxxxxxx
To say that it is FUNDAMENTAL to the
language that sizeof(char) == 1?

When something is part of the standard, is used (as an implicit
assumption)
by every single application developed in that language for the last 30
years,
and every single such application will break if this changes, then yes,
it is fundamental.


Err, no. HelloWorld.cpp does not make use of the fact that sizeof(char) ==
1. That's my point. Many modern apps are Unicode native and wouldn't make
this assumption either.





Well yes. If I know a file is not saved in Unicode, of course we need
special routines to read it and convert it, but what has that got to do
with whether a native "char" is 1 byte or 2 bytes?

It has. You will need another data type for "characters that are not
Unicode"
to read such a file.


Yes, but what of it? Use another data type to read the file, then convert
it to Unicode strings for internal use.

-- David


.



Relevant Pages

  • Re: VB6, VB2005, or Something Else?
    ... don't understand is that you are moving completely to Delphi. ... including a fundamental data type. ... I know they are specified in the language. ... ignored the C++ standard and adopted it only slowly. ...
    (microsoft.public.vb.general.discussion)
  • Re: VB6, VB2005, or Something Else?
    ... I don't remember his name but he made a statement like "cleared up the language". ... During the move to 32bit MS changed several things, including a fundamental data type. ... C++ and IIRC Delphi have made this changes too. ... It's based on a language ECMA standard. ...
    (microsoft.public.vb.general.discussion)
  • Re: Are _T() and TEXT() macros equivalent?
    ... When something is part of the standard, is used (as an implicit assumption) ... by every single application developed in that language for the last 30 years, ... Mihai Nita [Microsoft MVP, Windows - SDK] ...
    (microsoft.public.vc.mfc)
  • Re: Is C99 the final C? (some suggestions)
    ... > that someone will try compile their stuff on an old compiler. ... > because the ANSI standard obsoleted them, and everyone picked up the ANSI ... fixed by using another language. ... >>are multiplying two expressions of the widest type supported by your ...
    (comp.lang.c)
  • Re: Two Questions about "strlen", "strcat" and "strcpy"
    ... >> No. zero terminated strings is the whole problem in the first place. ... > OR length prefixed strings the language would retain compatibility ... is not easily duplicated with the old standard then it will foster interest. ... The C standards committee is dead. ...
    (comp.lang.c)