POV-Ray : Newsgroups : povray.text.scene-files : Eyeball code. : Re: Eyeball code. Server Time
29 Jul 2024 02:32:48 EDT (-0400)
  Re: Eyeball code.  
From: Nieminen Mika
Date: 21 Jun 1999 09:40:24
Message: <376e40c8@news.povray.org>
Ken <tyl### [at] pacbellnet> wrote:
: The biggest problem then lies with the fact that there is no agreement
: as to what constitutes "proper" indentation. No one seems to be able
: to agree on that either.

  A "proper" indentation is one which allows you to easyly see where does
a block start and where does it end without having to search through the
entire code (ie. you can just skip the majority of the code if you only
want to see where does the block end). This is speacially important with
nested blocks. You only need 3 or 4 levels of nesting for the non-indented
code to be almost completely unreadable.
  This same indentation of nested blocks is also used in other places than
programming, for example the html lists (see for example the povVFAQ page).
The indentation of blocks makes it easy to "parse" the contents of the
text. You can easyly see the "title" of each block and choose the block
you want.
  This same principle applies to code (povray or whatever). The command
at the beginning of a block is the "title" of that block (for example
"#while" or "sphere"). If you are not interested in that block you can
easyly skip it and go to the next block.
  Now, this skipping is very hard if you can't see where does the block end.
It's extremely tedious to search through the entire text to see where does
the next block begin.
  Just imagine a newspaper with _all_ its text without titles, blocks,
columns, newlines, empty lines, etc. Searching for certain news could be
extremely tedious. The same applies to pov-code.

-- 
main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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