POV-Ray : Newsgroups : povray.general : The Language of POV-Ray : Re: The Language of POV-Ray Server Time
11 Aug 2024 11:17:51 EDT (-0400)
  Re: The Language of POV-Ray  
From: Axel Baune
Date: 13 Mar 2000 09:34:14
Message: <38CCFC95.A0B8BE1E@neuro.informatik.uni-ulm.de>
Johannes Hubert wrote:
> 
> "Axel Baune" <aba### [at] neuroinformatikuni-ulmde> wrote in message
> news:38C8DAB2.3BE14CC3@neuro.informatik.uni-ulm.de...
> >
> > No, I don't think so. In most programming languages the state of the
> > variables used in a for-loop are undefined outside the loop, but most
> > programmers ignores this and use the mostly undocomented feature, that
> > after the for-loop the variable has the value of the variable in the
> > last loop incremented by the specified step.
> 
Hello,

Johannes Hubert wrote:
> Not really correct either. You are probably thinking of C++, where the
> ISO/ANSI standard says that a variable declared (and initialized) inside
> of the for-statement is defined only in the statement and the block that
> belongs to it. A fact that is still ignored by most compilers (the
> standard is still kind of fresh).

The standard isn't that fresh. This 'definition' for an for-loop was the
original  design of the computer scientists for the basic programming
language independant programming standard. But, however the compiler and
most standards ignored it till jet.

PoD wrote:
> This is getting away from the gist of the thread though.
Yes, you are right. All I wanted to express was, that with such (dirty)
possibilities of the for-loop, the code may be less understandable by
newbies and also for advanced users. I don't know how you leard new
programming languages, but I for myself learn mostly by looking into
code from advanced programmers. But sometimes it is very hard to
understand their code, because they used very cryptic programming and
'dirty' tricks (the for-loop is one of the programming structures at the
top of list used in 'dirty' tricks)

With you permission I will say no more to this. I've stated my opinion,
and I don't want to overstress it anymore.

Thanks, and sorry if my words are/were a bit rude,
Your Axel Baune


Post a reply to this message

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