Re: C/C++ language proposal: Change the 'case expression' from"integ ral constant-expression" ; to "integr al expression" ;
On Thu, 30 Oct 2008 12:05:18 -0700, Keith Thompson wrote:
I read your message as suggesting non-portable had to be a goal for 'A'<=c
&& c<='Z' to be the right thing. If you meant that non-portable can be
okay, just that you need to be aware of it, then agreed.
On Thu, 30 Oct 2008 12:05:18 -0700, Keith Thompson wrote:
Harald van Dijk <truedfx@gmail. comwrites:
>
I'd call that deliberately non-portable, at least if you know what
you're doing.
>On Wed, 29 Oct 2008 13:45:46 -0700, Keith Thompson wrote:
>>
>It doesn't need to be *deliberately* non-portable. If you were
>implementing your own C library, on an ASCII-based machine with minimal
>locale support, this could be the best way to write isupper.
>>Caveat: Sometimes ('A' <= c && c <= 'Z') *is* exactly what you want,
>>if you're writing deliberately non-portable code.
>>if you're writing deliberately non-portable code.
>It doesn't need to be *deliberately* non-portable. If you were
>implementing your own C library, on an ASCII-based machine with minimal
>locale support, this could be the best way to write isupper.
I'd call that deliberately non-portable, at least if you know what
you're doing.
&& c<='Z' to be the right thing. If you meant that non-portable can be
okay, just that you need to be aware of it, then agreed.
Comment