Re: When is "z" != "z" ?
| From: | tedd | Date: | Sun, 04 Jun 2006 22:51:49 +0000 |
| Subject: | Re: When is "z" != "z" ? | ||
| References: | 1 2 3 4 5 6 7 8 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-237383@lists.php.net to get a copy of this message | ||
At 4:53 PM -0400 6/4/06, Robert Cummings wrote:
>On Sun, 2006-06-04 at 16:45, tedd wrote:
>
> > -- not continue past "aaa"? Clearly, if "aaa" is less than
> > "z" then why does the loop stop at "yz"?
>
>Because right after 'yz' there is 'zz' and 'z' is neither less
>than nor
>equal to 'zz'.
and
At 4:37 PM -0500 6/4/06, Larry Garfield wrote:
>On Sunday 04 June 2006 15:04, tedd wrote:
>> Likewise "a" is DEC 97 (0110 0001) and "z" is DEC 122 (0111 1010) and
>> if I
>> compare "a" to "z" , it will always be less by numeric definition.
>
>In C or C++, yes. In PHP, do not assume the same string->number mapping.
Numeric definition is irrelevant.
It's a sign of genius to make the complicated simple. Learning new things about php every day.
Thank you both.
tedd
PS: Great language. -- thanks Lerdorf.
--
------------------------------------------------------------------------------------
http://sperling.com http://ancientstones.com http://earthstones.com