POV-Ray : Newsgroups : povray.pov4.discussion.general : I want to be rid of my stupid mistakes : Re: I want to be rid of my stupid mistakes Server Time
19 May 2024 07:06:17 EDT (-0400)
  Re: I want to be rid of my stupid mistakes  
From: Warp
Date: 22 Jul 2009 10:33:06
Message: <4a672321@news.povray.org>
Trevor G Quayle <Tin### [at] hotmailcom> wrote:
> One further item on the potential creation of #for loops:  Would they be best
> end-bracketted with the general #end statement (as #while, #if, #switch and
> #macro all use)? Or would it be more appropriate to add a "#next" statement or
> even "#next n" statement instead?  #end would make it more consistent with
> current programming practice, but #next would make the #for loop construct more
> visible and identifiable.

  I don't support the idea of adding new keywords just to serve as comments.
If you want to comment your code, use comments. I personally use this style
quite a lot:

#while(a < b)
  some stuff here

  #while(c < d)
    some other stuff here

    #if(something)
      more stuff here
    #end // #if(something)

    additional stuff

  #end // #while(c < d)
#end // #while(a < b)

  (In fact, I use this style with large blocks when programming in C++ as
well.)

-- 
                                                          - Warp


Post a reply to this message

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