Re: sorting std::vector<string> ignoring case



Ok, I understand your "P.S." point. You're right. Only one thing: I didn't
say that _stricmp is ANSI compatible (I'm sorry again if I wasn't very clear
or very specfic). I suggested the use of _stricmp because (like you said) its
name it's conformant with standard (because it's declared inside string.h).

Best regards

--
Cholo Lennon
Bs.As.
ARG


"Doug Harrison [MVP]" <dsh@xxxxxxxx> wrote in message news:rue643996um34ojfjc7clsq6o6tgu03mg5@xxxxxxxxxx
On Thu, 10 May 2007 11:09:06 -0300, "Cholo Lennon"
<chololennon@xxxxxxxxxxx> wrote:

"Doug Harrison [MVP]" <dsh@xxxxxxxx> wrote in message news:gp3543tv3hm1a44ihbh67e6lbfvtjo4321@xxxxxxxxxx
On Wed, 9 May 2007 00:18:22 -0300, "Cholo Lennon" <chololennon@xxxxxxxxxxx>
wrote:

I'm sorry for my wrong expression, with 'portable' I wanted to say ANSI compatible. Also I didn't say that the original names
has
been removed. They exist yet. Still is valid to use them in VC8 but, like you appointed, they are deprecated.

This is extremely nitpicking, but I believe stricmp and _stricmp are
equally "ANSI compatible", and I gave the reason in the "P.S." part of my
last message. I think the important point is to realize that while declared
in <string.h>, neither are Standard C functions.

Am I missing something? I don't see stricmp in the C89/C99/C++ 98 standards

I thought you were saying to avoid stricmp because it isn't "ANSI
compatible" and to use _stricmp because it is. Indeed, the latter is "ANSI
compatible" in the sense that it is an implementation-defined non-standard
function that begins with an underscore. But in an "extremely nitpicking"
way, so is stricmp, for the reasons I gave in the "P.S." part of my earlier
message. However, like I said, "neither are Standard C functions". There's
no contradiction, as "ANSI compatible" does not imply "standard library
function"; the former just means "does not violate the standard". So, you
really don't need to choose _stricmp over stricmp for reasons of
"portability" or "ANSI compatibility". The real reason is that MS has made
stricmp deprecated. Also, if you compile with /Za, which #define __STDC__
for .c files, and I don't know anyone who does or ever has <g>, MS has
chosen to make stricmp go away, even though they could have left it alone
and still been "ANSI compatible".

--
Doug Harrison
Visual C++ MVP




.



Relevant Pages

  • Re: sorting std::vector ignoring case
    ... This is extremely nitpicking, but I believe stricmp and _stricmp are ... I thought you were saying to avoid stricmp because it isn't "ANSI ... However, like I said, "neither are Standard C functions". ...
    (microsoft.public.vc.stl)
  • Re: ANSI C compliance
    ... because I'm liable to be quoted out of context -- ANSI ... Several others have made this point, but even when portability is ... or for a million other but-what-difference-can-that-make reasons. ... Standard conformance is an instance of undefined behavior, ...
    (comp.lang.c)
  • Re: scheme seems neater
    ... Are there other reasons, in an age of ... I have understood "evolving the CL standard" as a reference to the ANSI ... the SRFI process is a good idea IMHO. ...
    (comp.lang.lisp)
  • Re: sorting std::vector ignoring case
    ... I suggested the use of _stricmp because its ... name it's conformant with standard. ... so I don't think leaving it alone would have hurt ... Doug Harrison ...
    (microsoft.public.vc.stl)
  • Designations for various C standards (was months ago: Requesting advice how to clean up C code for v
    ... later adopted by ANSI). ... international ISO standard should probably take precedence. ... I'll try to remember to refer to it as ISO C ... Bad for two reasons: ...
    (comp.lang.c)

Loading