POV-Ray : Newsgroups : povray.newusers : Is there a "string length" function? : Re: Is there a "string length" function? Server Time
31 Jul 2024 10:29:12 EDT (-0400)
  Re: Is there a "string length" function?  
From: Christopher James Huff
Date: 23 Feb 2003 12:04:38
Message: <cjameshuff-D57F98.12011623022003@netplex.aussie.org>
In article <3e58e425@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

> Will W <wil### [at] nospamwizzardsnet> wrote:
> > Organizing functions by return type is, for me, an intriguing idea.
> 
>   There's a very good reason for this in programming, as I explained
> previously.

This isn't programming, it's documentation. The first thing most people 
will look for when looking for a string length function is a group of 
functions for manipulating strings.


>   The type of something determines where it can be used. For example, if
> an integer is expected in a particular place, then any item of integer
> type can be used there (ie. an integer literal, an integer variable, an
> integer function or an expression which result is an integer).

The purpose determines where it is useful. strlen() is only useful when 
handling strings, it is useless for math stuff.


>   The purpose of a function (eg. to manipulate strings or whatever) is
> a higher-level concept which has nothing to do with its type. The parameters
> the function takes have nothing to do with its type (they don't affect in
> any way *where* you can use the function).

Higher-level means closer to human thinking. The documentation is meant 
to teach humans.

-- 
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.