POV-Ray : Newsgroups : povray.general : Question 'bout indentation (no flamewar) : Re: Question 'bout indentation (no flamewar) Server Time
12 Aug 2024 03:31:21 EDT (-0400)
  Re: Question 'bout indentation (no flamewar)  
From: Bob Hughes
Date: 29 Mar 1999 20:25:22
Message: <370027F3.1CC2D10B@aol.com>
I'll bite, even though I had such a hard time just now getting through
the "other" latest round of indentation threading.

#if (A > 0)
 union {
#endif
  sphere { ... }
#if (A > 0)
  sphere { ... }
 }
#endif

Sloppy indenting maybe but you asked. Guess I better explain my casual
indentation method just the same.
To me the #if's and corresponding #endif's are the priority in this and
aren't embedded in one another so are left-most, no need to indent one
or the other set. The union is second priority to me and inset once,
closing brace aligned with the union keyword. The spheres (final
priority) are equal objects and indented inward of the union; not
affecting one or the other such as in a difference, intersection, or
merge, so are lined up along the vertical column.
That too simplistic? Well now you know about my style, simple even if
not exactly understandable on down the pike.


Roland Mas wrote:
> 
>   Hi all.
> 
> I have a question about indentation.  I fear it might degenerate
> into another flamewar, but heh, such is life.  On the other hand, it
> might bring some arguments to Ken Tyler.
> 
>   Suppose you have the following lines:
> 
> #if (A > 0)
> union {
> #endif
> sphere { ... }
> #if (A > 0)
> sphere { ... }
> }
> #endif
> 
>   How would you indent?
> 
>   The point is: there are two different hierarchies that have nothing
> to do with each other /a priori/.  You cannot mix them, 'cause you end
> up with incoherences.
> 
>   The other point is: do you indent the first sphere?  At write time,
> you don't know whether the union will exist (if you did, the test
> would be useless).  So, do you indent the sphere as inside the union,
> or do you leave it unindented?
> 
>   Might be of some interest to discuss, although I'm afraid the issue
> is insoluble.
> 
> Roland.
> --
> Roland Mas
> 
> Sauvez les castors, plantez des arbres.

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/homepage.htm
 mailto:inv### [at] aolcom?Subject=PoV-News


Post a reply to this message

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