POV-Ray : Newsgroups : povray.general : #for loop example? Server Time
29 Jul 2024 02:26:18 EDT (-0400)
  #for loop example? (Message 1 to 10 of 15)  
Goto Latest 10 Messages Next 5 Messages >>>
From: posfan12
Subject: #for loop example?
Date: 29 Aug 2013 23:40:01
Message: <web.522013bdc89c39cf41a177270@news.povray.org>
Could someone please post an example of a #for loop? There is none in the docs.
(Which should be fixed, too.)


Mike


Post a reply to this message

From: posfan12
Subject: Re: #for loop example?
Date: 30 Aug 2013 00:40:00
Message: <web.5220210c2fe6256c41a177270@news.povray.org>
"posfan12" <nomail@nomail> wrote:
> Could someone please post an example of a #for loop? There is none in the docs.
> (Which should be fixed, too.)
>
>
> Mike

Never mind I figured it out. Here is an example:

#for (j, 0, 4)
 #debug concat("j = ",str(j,0,0),"\n")
#end

should result in:

j = 0
j = 1
j = 2
j = 3
j = 4


Post a reply to this message

From: Le Forgeron
Subject: Re: #for loop example?
Date: 30 Aug 2013 07:49:39
Message: <522086d3$1@news.povray.org>
Le 30/08/2013 06:35, posfan12 a écrit :
> Never mind I figured it out. Here is an example:
> 
> #for (j, 0, 4)
>  #debug concat("j = ",str(j,0,0),"\n")
> #end
> 
> should result in:
> 
> j = 0
> j = 1
> j = 2
> j = 3
> j = 4

and
#for(j,0,4,0.5)
give 0, 0.5, 1, ... and so on

-- 
Just because nobody complains does not mean all parachutes are perfect.


Post a reply to this message

From: James Holsenback
Subject: Re: #for loop example?
Date: 30 Aug 2013 08:09:21
Message: <52208b71$1@news.povray.org>
On 08/29/2013 11:38 PM, posfan12 wrote:
> Could someone please post an example of a #for loop? There is none in the docs.
> (Which should be fixed, too.)

yikes ... i don't think the syntax diagram could be /any/ clearer
http://wiki.povray.org/content/Reference:Conditional_Directives#The_for_Directive


Post a reply to this message

From: Bald Eagle
Subject: Re: #for loop example?
Date: 30 Aug 2013 10:15:01
Message: <web.5220a7c42fe6256cdd2ebc560@news.povray.org>
> yikes ... i don't think the syntax diagram could be /any/ clearer

Well, that's the challenge with documenting anything or communicating via text.
You'd be surprised by what can be misinterpreted or misunderstood.

I myself am not always sure what makes something seem confusing at first, but
then makes it 'click'.

I think sometimes it might be easier on you to just write a large POV file with
small illustrative examples of each directive, than to agonize over how best to
describe their usage - especially considering the many languages POV users
speak.

A small example might be worth a page and a half of documentation.


Post a reply to this message

From: James Holsenback
Subject: Re: #for loop example?
Date: 30 Aug 2013 10:55:58
Message: <5220b27e$1@news.povray.org>
On 08/30/2013 10:10 AM, Bald Eagle wrote:
>
>> yikes ... i don't think the syntax diagram could be /any/ clearer
>
> Well, that's the challenge with documenting anything or communicating via text.
> You'd be surprised by what can be misinterpreted or misunderstood.
>
> I myself am not always sure what makes something seem confusing at first, but
> then makes it 'click'.
>
> I think sometimes it might be easier on you to just write a large POV file with
> small illustrative examples of each directive, than to agonize over how best to
> describe their usage - especially considering the many languages POV users
> speak.
>
> A small example might be worth a page and a half of documentation.
>
>
>
>
holy mackerel you guys slay me!!!!

http://wiki.povray.org/content/Reference:Conditional_Directives#The_for_Directive


Post a reply to this message

From: Le Forgeron
Subject: Re: #for loop example?
Date: 30 Aug 2013 12:05:15
Message: <5220c2bb$1@news.povray.org>
Le 30/08/2013 16:55, James Holsenback nous fit lire :
>>
>>
>>
> holy mackerel you guys slay me!!!!

You can show them the text, you cannot force them to read it.

(I have the same issue at work with customers/coworkers and error
message: every details about how to solve the detected problem is in the
message ("set the damn environment variable FOO_BAR to the path of the
license file." (well, worded in marketing-speak, with PC everywhere),
yet they ask how to get past the complain. And it's the second line of
text, in red, in the opened console, and there is nothing after it....
Nah... "Yeah, it does not work, how do... "GRRRRR


James, You deserve a pat on the back.


Post a reply to this message

From: MichaelJF
Subject: Re: #for loop example?
Date: 30 Aug 2013 13:05:01
Message: <web.5220cfd72fe6256c9a9e0ecc0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> > yikes ... i don't think the syntax diagram could be /any/ clearer
>
> Well, that's the challenge with documenting anything or communicating via text.
> You'd be surprised by what can be misinterpreted or misunderstood.
>
> I myself am not always sure what makes something seem confusing at first, but
> then makes it 'click'.
>
> I think sometimes it might be easier on you to just write a large POV file with
> small illustrative examples of each directive, than to agonize over how best to
> describe their usage - especially considering the many languages POV users
> speak.
>
> A small example might be worth a page and a half of documentation.

Yes, indeed, sometimes misunderstandings and misinterpretations between native
and nonnative speakers can yield a dispute here unwanted by both parts
completely. And there are other differences between the members of this still
wonderful community yielding different interpretations of  - or different
feelings to - the same word. E.g. the word "death" will yield other emotions to
a former  soldier, who risked his own life, than to a former male nurse, who had
to carry away the bodies of  some hundred adolescents died from leukaemia.

May be Posfan12 has overlooked the explanation of the for-loop (which is
possible if he uses Windows 8, the POV help workes not really good with Windows
8) or he has not much experience with computer sciences. Imagine that you have
never learned about a for-loop so far. That is hard to imagine, but possible.

BTW: I don't think that anyone want's to slay you, James. What has a fish
(mackarel) to do with that?

Best regards,
Michael


Post a reply to this message

From: James Holsenback
Subject: Re: #for loop example?
Date: 30 Aug 2013 15:42:45
Message: <5220f5b5$1@news.povray.org>
On 08/30/2013 12:05 PM, Le_Forgeron wrote:
> Le 30/08/2013 16:55, James Holsenback nous fit lire :
>>>
>>>
>>>
>> holy mackerel you guys slay me!!!!
>
> You can show them the text, you cannot force them to read it.

exactly ... reminds me of /another/ old saying, but I won't mention as 
it will most likely be parsed incorrectly. btw: not implying you

>
> (I have the same issue at work with customers/coworkers and error
> message: every details about how to solve the detected problem is in the
> message ("set the damn environment variable FOO_BAR to the path of the
> license file." (well, worded in marketing-speak, with PC everywhere),
> yet they ask how to get past the complain. And it's the second line of
> text, in red, in the opened console, and there is nothing after it....
> Nah... "Yeah, it does not work, how do... "GRRRRR
>
>
> James, You deserve a pat on the back.
>

holy smokes ... thanks! lol ... not signaling the new pope


Post a reply to this message

From: Stephen
Subject: Re: #for loop example?
Date: 30 Aug 2013 16:17:31
Message: <5220fddb$1@news.povray.org>
On 30/08/2013 5:05 PM, Le_Forgeron wrote:
> James, You deserve a pat on the back.

I second that.
A difficult job well done without complaint.

Well not many. ;-)

-- 
Regards
     Stephen


Post a reply to this message

Goto Latest 10 Messages Next 5 Messages >>>

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