Hi Chris,

On Mon, 20 Feb 2012 14:32:30 -0500
  chm <devel.chm...@gmail.com> wrote:
> 
> I think current compilers can keep this efficient
> and lift out the initializations oft of loops and
> other such optimizations.
> 
> A related point is that not all compilers can deal
> with declarations that are not at the beginning of
> the enclosing block (some versions of MSVC come
> to mind) and will complain or quit if "sloppy"
> C++ style declarations are used.
> 

The latter was exactly the problem that raised the
question. I corrected it in csa.c, so that the MSVC
compiler woudl accept the code.

One thing I find quirky about this style of programming
(and it is ubiquitous in Java and C++, where declarations
can occur anywhere in the code) is that sometimes, 
changing
the code in a loop forces you to move the declaration
outside the loop, thus increasing the scope of the 
variable.
If that does not happen, however, such a restricted scope
can greatly help understanding the code.

Regards,

Arjen

 

DISCLAIMER: This message is intended exclusively for the addressee(s) and may 
contain confidential and privileged information. If you are not the intended 
recipient please notify the sender immediately and destroy this message. 
Unauthorized use, disclosure or copying of this message is strictly prohibited.
The foundation 'Stichting Deltares', which has its seat at Delft, The 
Netherlands, Commercial Registration Number 41146461, is not liable in any way 
whatsoever for consequences and/or damages resulting from the improper, 
incomplete and untimely dispatch, receipt and/or content of this e-mail.





------------------------------------------------------------------------------
Keep Your Developer Skills Current with LearnDevNow!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-d2d
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to