POV-Ray : Newsgroups : povray.newusers : Is there a "string length" function? : Re: Is there a "string length" function? Server Time
31 Jul 2024 10:23:25 EDT (-0400)
  Re: Is there a "string length" function?  
From: Christopher James Huff
Date: 22 Feb 2003 22:00:01
Message: <cjameshuff-2130A7.21565722022003@netplex.aussie.org>
In article <3e57e14a@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   For example the #debug command takes as parameter a string. A string
> can be a string literal, a string identifier or a string function. Since
> strlen() is not a string function (but a float function) it can't be given
> to #debug.

That's got nothing to do with it. Return type is only loosely related to 
the purpose of a function. strlen() deals with strings, feed it a float 
and see what it does.


> > If POV were object oriented, it would 
> > be a method of string objects, not floats.
> 
>   Its location would not change the fact that it's a float function
> (there's no reason why there could not be float functions in a string
> class).

All methods of a string class are string methods. Return type is 
irrelevant.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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