POV-Ray : Newsgroups : povray.newusers : Is there a "string length" function? : Re: Is there a "string length" function? Server Time
31 Jul 2024 10:20:14 EDT (-0400)
  Re: Is there a "string length" function?  
From: Mark Wagner
Date: 23 Feb 2003 05:41:37
Message: <pan.2003.02.23.10.40.14.442108.275@gte.net>
On Sat, 22 Feb 2003 07:16:15 -0500, Warp quoth:

> Christopher James Huff <cja### [at] earthlinknet> wrote:
>> I see a bunch of categories that it doesn't fit in, and one that it
>> does. strlen() isn't a float function, it is a string function.
>> Categorizing by purpose makes much more sense.
> 
>   strlen() is a float function.
> 
>   There's a good and logical reason for calling it a float function (and
> you should know it without me telling it).
>   The reason for calling it a float function according to its return
>   value
> type is that it can be used anywhere a float is expected. In the same
> way a vector function can be used anywhere a vector is expected.

>   So naming and categorizing functions by their return value is not only
> logical but it's actualy a categorization by purpose: Float functions
> are those which can be used anywhere a float value is expected.

Is there any reason why it can't go in both places?  It's a float
function because it returns a float, and a string function because it
operates on strings.

And before you object, "trace" would be a vector function because it
returns a vector, and an object function because it operates on objects.

-- 
Mark


Post a reply to this message

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