POV-Ray : Newsgroups : povray.newusers : Is there a "string length" function? Server Time
31 Jul 2024 12:15:58 EDT (-0400)
  Is there a "string length" function? (Message 1 to 10 of 46)  
Goto Latest 10 Messages Next 10 Messages >>>
From: Joseph Zeglinski
Subject: Is there a "string length" function?
Date: 19 Feb 2003 18:56:36
Message: <3e5419b4@news.povray.org>
Hi,
    I have a string Value I need to "print". However, in order to scale the
space for the word to fit on the object, I need to know how many charcaters
are in the variable. Is there a strlen() function in POVRAY ?

Thanks.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.449 / Virus Database: 251 - Release Date: 27/01/2003


Post a reply to this message

From: Christopher James Huff
Subject: Re: Is there a "string length" function?
Date: 19 Feb 2003 23:16:41
Message: <cjameshuff-EC9D69.23141319022003@netplex.aussie.org>
In article <3e5419b4@news.povray.org>,
 "Joseph Zeglinski" <JAZ### [at] rogerscom> wrote:

>     I have a string Value I need to "print". However, in order to scale the
> space for the word to fit on the object, I need to know how many charcaters
> are in the variable. Is there a strlen() function in POVRAY ?

Er, yes...it's called "strlen()". Did you even bother to check the 
manual or try it?

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

From: George Pantazopoulos
Subject: Re: Is there a "string length" function?
Date: 20 Feb 2003 19:59:26
Message: <3e5579ee$1@news.povray.org>
In defense of the newbs, that manual is pretty intimidating and hard to use
for someone new to the program. I know my brain used to turn to jello just
looking at it.. even if it seems thorough and straightforward now :)

George


"Christopher James Huff" <cja### [at] earthlinknet> wrote in message
news:cja### [at] netplexaussieorg...
> In article <3e5419b4@news.povray.org>,
>  "Joseph Zeglinski" <JAZ### [at] rogerscom> wrote:
>
> >     I have a string Value I need to "print". However, in order to scale
the
> > space for the word to fit on the object, I need to know how many
charcaters
> > are in the variable. Is there a strlen() function in POVRAY ?
>
> Er, yes...it's called "strlen()". Did you even bother to check the
> manual or try it?
>
> --
> 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

From: ABX
Subject: Re: Is there a "string length" function?
Date: 21 Feb 2003 04:14:35
Message: <u7rb5vo18nrcls84cs5076qoultvunvhda@4ax.com>
On Thu, 20 Feb 2003 20:10:55 -0500, "George Pantazopoulos"
<the### [at] attbicom*KILLSPAM*> wrote:
> In defense of the newbs, that manual is pretty intimidating and hard to use
> for someone new to the program.

If you are looking for function to operate on strings what will be the name you
will be looking for ? Isn't chapter "String Functions" well named ? The last but
one sentence there says: 'See section "Float Functions" for other functions
which are somewhat string-related but which return floats.' So switching to
"Float Functions" gives an answer. What hard in use was there exactly ?

ABX


Post a reply to this message

From: Tom Melly
Subject: Re: Is there a "string length" function?
Date: 21 Feb 2003 04:15:43
Message: <3e55ee3f$1@news.povray.org>
"George Pantazopoulos" <the### [at] attbicom*KILLSPAM*> wrote in message
news:3e5579ee$1@news.povray.org...
>
> In defense of the newbs, that manual is pretty intimidating and hard to use
> for someone new to the program. I know my brain used to turn to jello just
> looking at it.. even if it seems thorough and straightforward now :)
>

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.


Post a reply to this message

From: S McAvoy
Subject: Re: Is there a "string length" function?
Date: 21 Feb 2003 05:33:14
Message: <3e56003e.6747031@news.povray.org>
On Fri, 21 Feb 2003 10:13:45 +0100, ABX <abx### [at] abxartpl> wrote:

 What hard in use was there exactly ?
>
>ABX

I think what George meant was, that to someone starting out using PovRay, the
manual has too much to much information to take in all at once. Not all users
are professional IT experts you know. PovRay attracts artists, as well as
techies, whose search skills may not be the best. It can be daunting trying to
find information you only have a hazy idea about using a manual you are not
familiar with. 
Knowing how helpful you are I assume that you meant "how can the documentation
be improved to help you find what you want to know". 

Regards
        Stephen


Post a reply to this message

From: Warp
Subject: Re: Is there a "string length" function?
Date: 21 Feb 2003 05:39:29
Message: <3e5601e0@news.povray.org>
Tom Melly <tom### [at] tomandlucouk> wrote:
> 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.

  Functions are categorized based on what they return.
  Functions can take any type of parameters (floats, vectors, strings,
objects...) and it would be too hard and awkward to start categorizing
them according to what they take as parameter. (For example, how would
you categorize the trace() function?)

-- 
#macro M(A,N,D,L)plane{-z,-9pigment{mandel L*9translate N color_map{[0rgb x]
[1rgb 9]}scale<D,D*3D>*1e3}rotate y*A*8}#end M(-3<1.206434.28623>70,7)M(
-1<.7438.1795>1,20)M(1<.77595.13699>30,20)M(3<.75923.07145>80,99)// - Warp -


Post a reply to this message

From: ABX
Subject: Re: Is there a "string length" function?
Date: 21 Feb 2003 06:17:59
Message: <li0c5vcapefa4bg5t58rj5rrp1t3dgdd41@4ax.com>
On Fri, 21 Feb 2003 10:33:12 GMT, mca### [at] aolcom (S McAvoy) wrote:
> Knowing how helpful you are I assume that you meant "how can the documentation
> be improved to help you find what you want to know". 

Yes and no. While working on softwear professionally I'm interested in making
apps as much user-friendly as possible because it makes my profits. In various
projects I'm also responsible for making/updating documentation and I have
direct access to users so I always listen all notes. Relating to POV-World I'm
working on MegaPOV and I know how much there is to improve - for example next
MegaPOV will probably have context help for MegaPOV related keywords (have to
solve some problem there).

In general working with computers requires some assumptions about user. If he is
looking for string related function I expect he will read "String functions"
chapter because logical connection between searched keyword and name of chapter
is obvious. Please note either "function" and "string" keywords appear in
subject of original post so you can't say he has language problems in that area.

I understand user can not know all names of chapters. But then simple search any
combination of "string", "function", "functions", "length" should lead to
something like: http://www.povray.org/search/?s=string+length+function where
either "String functions" and "Float functions" are at top. If he do not tried
search nor read table of content then whatever will be written in documentation
he will never find it. Moreover he used "strlen" keyword which appear in index
of documentation.

My elaborated answer is not offence against original poster because I understand
that's what new users usually do - never start from manual. My answer is against
wrong conclusions mentioned later. Documentation has probably holes but none
documentation hole caused that user to be asking for string length function.

ABX


Post a reply to this message

From: ABX
Subject: Re: Is there a "string length" function?
Date: 21 Feb 2003 06:27:22
Message: <563c5vkr7127gqr3k2cpjoil5d2h67fkkc@4ax.com>
On Fri, 21 Feb 2003 12:17:09 +0100, ABX <abx### [at] abxartpl> wrote:
> for example next
> MegaPOV will probably have context help for MegaPOV related keywords

Of course I mean Windows port of MegaPOV.

ABX


Post a reply to this message

From: S McAvoy
Subject: Re: Is there a "string length" function?
Date: 21 Feb 2003 07:46:52
Message: <3e561f94.14768976@news.povray.org>
I'm pleased to hear that MegaPOV will probably have context sensitive help
although I've not used it since POV Ver 3.5 was released, too many other things
to do. Keep up the very good work.
It's true what you say about users, and when your getting paid for supporting
them you just have to "grin and bare it" but when your support is free and done
out of love it can be frustrating to know that if they had read the manual they
would not need to ask.
BTW I read this Q & A a few weeks ago : . Q - What do you call a person who asks
for easily obtainable information. A - A boss."
I understood the response to 'Christopher James Huff' as an attempt to soften
this reply. Writing to news groups can be a means of joining a community and
should be encouraged IMHO. Personally no one I know is the slightest bit
interested in computer graphics and it can get lonely. Maybe that is why I like
to encourage others.

Regards
        Stephen


Post a reply to this message

Goto Latest 10 Messages Next 10 Messages >>>

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