POV-Ray : Newsgroups : povray.general : Has string handling been changed or improved? : Re: Has string handling been changed or improved? Server Time
29 Jul 2024 22:27:54 EDT (-0400)
  Re: Has string handling been changed or improved?  
From: Alain
Date: 10 May 2010 20:07:37
Message: <4be89fc9@news.povray.org>

> On 05/10/2010 01:53 PM, Kenneth wrote:
>> "Kenneth"<kdw### [at] earthlinknet>  wrote:
>
>> Oops, I think I see my own error (I *think*.) Given the way this example is
>> written in the wiki, is the #if comparing the NUMBER of letters in TestCase
>> ("testing" = 7) to those of "Testing123" (10)?
>
> nope ... i believe the evaluation is done in lexicographical order ie:
> testinf would be less than testing
>
> Jim
>

It does a loop and test each characters in turn. The first pair of 
missmatching will trigger the condition. A successfull test for equality 
is the longest, or if only the last character is different, as you had 
to compare every characters.

"a"<"b"
"Z"<"a" as uppercase come before lower case
"a"<"aa" second "a" is compares to NULL
"b">"aa" The second "a" is ignored as the first characters are different.


Alain


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.