POV-Ray : Newsgroups : povray.newusers : Is there a "string length" function? : Re: Is there a "string length" function? Server Time
31 Jul 2024 10:28:24 EDT (-0400)
  Re: Is there a "string length" function?  
From: Slashdolt
Date: 22 Feb 2003 23:28:48
Message: <3e584e00@news.povray.org>
"Tom Melly" <tom### [at] tomandlucouk> wrote in message
news:3e55ee3f$1@news.povray.org...
>
> One oddity in this case is that strlen (and some other string-related
functions)
> do not appear under the string function section, but instead are under the
> float-function section. Okay, it returns a float, but IMHO such functions
could
> be listed in both sections.
>

When I first read the post, and the subsequent response, I initally had
quite a chuckle and thought to myself, "Ha! What a dolt!"  But now, I agree,
and I have to admit that it would have been hard to spot.

I've been programming professionally (not in POV-Ray) for about 15 years.
Not that it makes me a great person, but just to establish some credibility.
If I wanted to find out if there was a string length function, I would have
typed "string" into the help.  I would have then scanned the page of all of
the string functions, which appear in blue on the left.  At that point, I
wouldn't have noticed anything about strlen.  I would have then scanned thru
strings.inc (in the help) and noticed that it didn't say anything either.
At that point, I could have taken my best guess and typed in "strlen", in
which case I would have found it, but I may just as easily have concluded
that it doesn't exist.

So...  Looking in Borland Delphi, I searched help, and found "string
handling routines", which then quickly took me to the Length function (which
is what it is called in Delphi).  The last place in POV-Ray that I would
have thought to look is in "Float Functions".  I understand how that can
make sense in terms of the design of the SDL and organization of the manual,
but without entirely understanding the SDL, I never would have thought to
look there.  If I see "float functions", I think about things that operate
on floating points values.  Does a string ever have a length of 7.12389
e-26?

I'm not saying the manual sucks or anything.  In fact, I've found it to be
incredibly useful and generally easy to follow.  If I had a dollar for every
time I thought a user was out of his @*&*(#$ mind, only to realize later
that perhaps he had a point, I'd be a rich man.

Just my $0.02

--
Slash


Post a reply to this message

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