POV-Ray : Newsgroups : povray.newusers : Is there a "string length" function? Server Time
31 Jul 2024 06:15:55 EDT (-0400)
  Is there a "string length" function? (Message 37 to 46 of 46)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Christopher James Huff
Subject: Re: Is there a "string length" function?
Date: 23 Feb 2003 18:43:05
Message: <cjameshuff-D944D9.18394423022003@netplex.aussie.org>
In article <3e595477@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   I'm still not comfortable with that.
>   How do you classify a function as "other"? How do I know from a given
> function if it's an "other" function?

If it doesn't fit in with the more specific categories. The "other" 
category would be quite small, and easy to check.

-- 
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: Joseph Zeglinski
Subject: Re: Is there a "string length" function?
Date: 23 Feb 2003 21:24:33
Message: <3e598261@news.povray.org>
"Joseph Zeglinski" <JAZ### [at] rogerscom> wrote in message
news: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
>
>

Gentlemen,
    Pray, thank you one and all ...some 35...so far. It was a simple question,
and wasn't meant to get off topic in some cases, with snide remarks by some.
As I scanned through the barrage of idle conversation, I wasn't sure if I had
inadvertantly logged into Monty Python's flying circus in rehearsal.

    To answer some of your questions about just WHO would be so very lazy
enough to ask such a totally stupid question about a "strlen()) function...I
see why you are dying to learn this answer.

(1) I asked for HELP on the "Newusers" group, because I mistakenly thought it
was meant for newbies on POVRAY, like myself. If that is the case, based on
the replies, I am in the wrong group - is there a "tiny tots for POVRAY"
group?

(2) I was just entering my initial trials with this product, and needed a
quick answer.  But, did I do "any work" to find the answer for myself?

    Well...yes... I downloaded the POVRAY Tutorial (because after a half day's
search on the internet and local bookstores, I couldn't find a POVRAY book,
still in print, even a used one,  to buy. Then I read through all of the
discussions on the POVRAY documentation group, etc. trying to find out if a
book was in the works. Discovered they aren't organized enough to answer at
this time, perhaps ever. Still no strlen() answer... so I looked through the
help file ... without much luck ( I must have missed it, I guess? damned
bi-focals).
    O.K. Needed to get out the heavy artillary - needed to print out (computer
screens are for propeller heads)  the TUTORIAL for POVRAY 3.5 - strange name
for a tombe of 782 pages - needs to be renamed  THE MANUAL or the BIBLE.
Inkjet....forget it. My old Laserjet-2 ... life is too short.
I needed to upgrade my 15 year old, and working great, LJ-2, to something
better.... yes... a Colour HP Laserjet 4600DN ...double sided duplexed colour
printing at an actual 8 seconds a colour page for a mere $4,500 Canadian
pesos.
    Finally, 1 hour 20 minutes, and 782 double sided pages, later I had a
beautiful copy of the colour  POVRAY Tutorial.
    However, as lovely as it is, and as well written as it was, and extremely
well organized, in all of it's Bachus-Naur illustrated explanations, along
with a detailed list of subject matter at the front  - though this entire
section was badly screwed up in PDF - the rest was indeed exquisite.
To my dismay, this turkey ... has no INDEX to scan for a topic quickly. Did
you guys forget something after putting the tombe to bed?
So, I flipped through the pages hunting for anything that talked about
"strings... functions... the meaning of life"  ... (should have read the
responses for that).

    So, after considerable hunting, expenditure of a fair amount of time and
energy, and a premature purchase of a printer for $4,500 ... I was no closer
to the holy grail of a strlen() answer.
Although ...I was beginning to think somebody was stringing me along.

(3) You have been wondering just what kind of a "dolt" ... you were being kind
... would dare ask such a stupid and simplistic answer from such an esteemed
and areodite group of newbies(?), who would be so patient with a newcomer with
his first post to the website, expecting someone equally new, to answer
quickly, patiently, and simply - from what he had himself learned in his early
days as a newbie.

The ANSWER....
    Well, I started out in "Machine Language Programming" (that's OP-CODES
entered using mechanical toggle switches, on a front panel with neon bulbs -
later advanced to typing them into a Selectric typewriter console on the old
IBM-1620 console - loved that machine, wish I had one today. That was using
binary one's and zero's, for most who are too young to know about such things,
back in the early 60's (... that's in the 1900's), and soon graduated to using
an ASSEMBLER. Finally, worked my way up through Fortran, Snowball, and several
others I don't recall, upto "The Great C+".

    So to your question "How does he know about something called strlen()"
enough to spell it correctly in a question  - ... I tripped over it while
reading my C-Manual.

Oh yes - is he an artiste? No, just a profesional engineer, with years of
dabbling in computer graphics as an interest. I would never have tried POVRAY
if I didn't find a sudden need to use it with EagleCAD 3D circuit board
eye-candy creations. Then, like most, got addicted... but I'm working on that
problem.

(4) Finally ... no one actually took the effort to simply copy the strlen()
syntax statement into a reply.
And I thought everybody was so expert in such a simple task.

    I really enjoyed the serious sessions of navel gazing ...or is it navel
grazing...that this question provoked. It might end up improving the
documentation ... perhaps by adding something like an INDEX section? Reading
the replies, I certainly learned a lot about the intricacies of language
structure, and how poorly the documentation in POVRAY is considered, by some.

    Then again... maybe I should have hunted for THE MANUAL instead of the
TUTORIAL at the POVRAY website. Or perhaps, have downloaded the POVRAY source
code, and skimmed through it - surely would have found a strlen() something.
My mistake, I just took the "obviously" easy way out.

I now have my answer ... but did anybody spot the answer to my question in all
of the 35 or so replies thus far?


...This has been niether a rant nor a flame...
but perhaps a tale told by a Dolt
full of sound and fury...
signifying nothing...

Cheers,
the DOLT !



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.456 / Virus Database: 256 - Release Date: 18/02/2003


Post a reply to this message

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

> (1) I asked for HELP on the "Newusers" group, because I mistakenly thought it
> was meant for newbies on POVRAY, like myself. If that is the case, based on
> the replies, I am in the wrong group - is there a "tiny tots for POVRAY"
> group?

It's just generally assumed that the manual is the first place people 
will look. That's why it exists, and is included with every distribution 
of POV-Ray.


>     Well...yes... I downloaded the POVRAY Tutorial (because after a half day's
> search on the internet and local bookstores, I couldn't find a POVRAY book,
> still in print, even a used one,  to buy. Then I read through all of the
> discussions on the POVRAY documentation group, etc. trying to find out if a
> book was in the works. Discovered they aren't organized enough to answer at
> this time, perhaps ever. Still no strlen() answer... so I looked through the
> help file ... without much luck ( I must have missed it, I guess? damned
> bi-focals).

I don't know what you downloaded. The manual is not separately available 
in an easily downloadable form, and there is no document called anything 
like "The POV-Ray Tutorial".
As for books...there are none that deal with a recent version of 
POV-Ray, and they would be unlikely to cover the strlen() function 
anyway...it's already documented in the manual.


>     O.K. Needed to get out the heavy artillary - needed to print out (computer
> screens are for propeller heads)  the TUTORIAL for POVRAY 3.5 - strange name
> for a tombe of 782 pages - needs to be renamed  THE MANUAL or the BIBLE.
> Inkjet....forget it. My old Laserjet-2 ... life is too short.

If you are talking about the document that came with POV-Ray, that *is* 
the manual, it just contains 2 tutorials. And it would be easier to 
search the electronic version than hunt through a hard copy.
Printing the manual takes a lot of paper, ink, and time, you miss out on 
any corrections, plus you would need to re-print it for POV updates. I 
initially printed large chunks of the manual twice, found I never used 
the hard copies, and gave up on it.


> To my dismay, this turkey ... has no INDEX to scan for a topic quickly. Did
> you guys forget something after putting the tombe to bed?

It's designed as an electronic document. Page numbers are pretty 
useless, it uses hyperlinks.


> (4) Finally ... no one actually took the effort to simply copy the strlen()
> syntax statement into a reply.
> And I thought everybody was so expert in such a simple task.

Well, you pretty much used it in your original message. strlen(STRING)


>     I really enjoyed the serious sessions of navel gazing ...or is it navel
> grazing...that this question provoked. It might end up improving the
> documentation ... perhaps by adding something like an INDEX section? Reading
> the replies, I certainly learned a lot about the intricacies of language
> structure, and how poorly the documentation in POVRAY is considered, by some.

An index of the type you are looking for wouldn't really be very useful. 
The manual *does* have an index (surprisingly enough, with the title of 
"Index"), but it does not use page numbers, it uses section numbers and 
hyperlinks, as is appropriate for a document intended to be read 
electronically.


>     Then again... maybe I should have hunted for THE MANUAL instead of the
> TUTORIAL at the POVRAY website. Or perhaps, have downloaded the POVRAY source
> code, and skimmed through it - surely would have found a strlen() something.
> My mistake, I just took the "obviously" easy way out.

I don't know where you got "THE TUTORIAL". There is no tutorial document 
remotely like what you describe, so you must be speaking of some version 
of the manual, and probably an old version because the new one isn't 
downloadable separately. Finding the current manual is quite easy: go to 
povray.org, click Documentation, or just find it in your POV-Ray 
installation.

-- 
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: Christopher James Huff
Subject: Re: Is there a "string length" function?
Date: 23 Feb 2003 22:54:41
Message: <cjameshuff-B38C1C.22511223022003@netplex.aussie.org>
In article <3e59555e@news.povray.org>, Warp <war### [at] tagpovrayorg> 
wrote:

>   You can call them "functions for getting information about an object",
> but don't mix up type terminology with this. That would only cause
> confusion.

I'm not using type terminology. I'm categorizing them by use. When I 
look for documentation on a function, I look for it by use, not by 
return type. I don't care what I'm going to use the return for, I care 
what I'm going to use the function with.
IMO, return type is a terrible way to organize things, with very limited 
use.

-- 
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: Mark Wagner
Subject: Re: Is there a "string length" function?
Date: 24 Feb 2003 02:39:54
Message: <pan.2003.02.24.07.38.18.774921.278@gte.net>
On Sun, 23 Feb 2003 18:12:30 -0500, Warp quoth:

> Christopher James Huff <cja### [at] earthlinknet> wrote:
>>>   There are no "object functions" in POV-Ray.
> 
>> trace(), min_extent(), max_extent(), inside()...I think that's it.
> 
>   Those are vector functions (because they can be used where a vector is
> expected). They are not object functions because they can't be used
> where an object is expected (there are no such functions in POV-Ray).
> 
>   You can call them "functions for getting information about an object",
> but don't mix up type terminology with this. That would only cause
> confusion.

The idea here is to make the manual easier to use.  If putting functions
into only one category causes problems like what Joseph Zeglinsky had,
they should be put in more than one place.  I repeat, is there any reason
why functions can't be placed in more than one category in the manual?

-- 
Mark


Post a reply to this message

From: hughes, b 
Subject: Re: Is there a "string length" function?
Date: 24 Feb 2003 06:35:52
Message: <3e5a0398@news.povray.org>
I didn't follow this thread because I thought it was a simple answer when it
started out and then it seemed to go a few different directions. Seems a
shared sentiment after looking at some other messages.

Like was pointed out, the "manual" is of the electronic form. I don't
understand why the Index and Search was ever overlooked. If I type the word
strlen into either of those I find all I'd need to know. I'm an avid Index
user and it almost always shows me something I'm trying to find out about
(after double-clicking an item from the list).

However, I can't say that the documentation is perfect. Only that it changes
with time and usually for the better. I liked Joseph Zeglinski's idea of a
printable document which would have an index to page numbers. Something
which would be best done by some sort of document creation program. I
especially liked the Monty Python's Flying Circus remark.
:-)

Most important thing seems to be that all this stimulated a potentially
productive discussion about document layout and keyword types. I was hoping
someone would have carried this over into the appropriate group, namely
p.d.i.. Might be too late for that.

Bob


Post a reply to this message

From: Tom Melly
Subject: Re: Is there a "string length" function?
Date: 24 Feb 2003 06:35:55
Message: <3e5a039b$1@news.povray.org>
"Joseph Zeglinski" <JAZ### [at] rogerscom> wrote in message
news:3e598261@news.povray.org...
>
>
> (1) I asked for HELP on the "Newusers" group, because I mistakenly thought it
> was meant for newbies on POVRAY, like myself. If that is the case, based on
> the replies, I am in the wrong group - is there a "tiny tots for POVRAY"
> group?
>

Look on the brightside - at least you didn't post to general. Hope we didn't
scare you off - hang around long enough and you will find the groups a valuable
source of help and information.

> (3) You have been wondering just what kind of a "dolt" ... you were being kind
> ... would dare ask such a stupid and simplistic answer from such an esteemed
> and areodite group of newbies(?), who would be so patient with a newcomer with
> his first post to the website, expecting someone equally new, to answer
> quickly, patiently, and simply - from what he had himself learned in his early
> days as a newbie.
>

Aw, you're being too hard on yourself (and us). You were just unlucky in that
you seemingly answered your own question - now if you'd posted "is there some
way of returning the number of letters in some text..."

>
> (4) Finally ... no one actually took the effort to simply copy the strlen()
> syntax statement into a reply.
> And I thought everybody was so expert in such a simple task.
>

Oops... ;)

> structure, and how poorly the documentation in POVRAY is considered, by some.
>

Poor, no, "intense", yes. Given the features of the Pov sdl, the documentation
is probably some of the best I've come across. It's us damn users who are the
problem.


Post a reply to this message

From: Warp
Subject: Re: Is there a "string length" function?
Date: 24 Feb 2003 08:09:03
Message: <3e5a196e@news.povray.org>
Christopher James Huff <cja### [at] earthlinknet> wrote:
> If it doesn't fit in with the more specific categories. The "other" 
> category would be quite small, and easy to check.

  So instead of using a well-defined, unambiguous and logical classification
system, we should use some obscure classification method based on someone's
feelings of what a function does (and if he doesn't feel that a function
does anything concrete, it's given a very abstract "other" classification)?

  I'm still not very comfortable.

  I support the idea that in the sections related to a particular thing
(such as strings or floats) there would be a "see also" subsection with
links to functions used for same purposes, but I don't support the idea
of changing the current classification system.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Warp
Subject: Re: Is there a "string length" function?
Date: 24 Feb 2003 08:10:53
Message: <3e5a19dc@news.povray.org>
Christopher James Huff <cja### [at] earthlinknet> wrote:
> IMO, return type is a terrible way to organize things, with very limited 
> use.

  I have explained why it's a logical system and you have failed to show
where my argumentations went wrong.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

From: Christopher James Huff
Subject: Re: Is there a "string length" function?
Date: 24 Feb 2003 09:54:54
Message: <cjameshuff-F7FC3A.09511824022003@netplex.aussie.org>
In article <pan### [at] gtenet>,
 Mark Wagner <mar### [at] gtenet> wrote:

> The idea here is to make the manual easier to use.  If putting functions
> into only one category causes problems like what Joseph Zeglinsky had,
> they should be put in more than one place.  I repeat, is there any reason
> why functions can't be placed in more than one category in the manual?

Length and redundancy. It would make the manual longer without adding 
any actual content, and it's harder to keep things up to date when you 
have the same thing documented in multiple places. Hyperlink cross 
references solve most of this problem, but make the documentation more 
complex and even less printable, and a reorganization would eliminate a 
lot of the need for them.

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

<<< Previous 10 Messages Goto Initial 10 Messages

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