POV-Ray : Newsgroups : povray.beta-test : [DOC] 6.2.2 The #declare and #local directives : [DOC] 6.2.2 The #declare and #local directives Server Time
2 Nov 2024 15:25:49 EDT (-0400)
  [DOC] 6.2.2 The #declare and #local directives  
From: Mark Wagner
Date: 26 Oct 2001 23:30:59
Message: <3bda2a73@news.povray.org>
In section 6.2.2.1, it says:
"Declarations, like most language directives, can appear anywhere in the
file - even within other statements. "

However, there is an exception to this: you cannot put a declaration, or any
other language directive, in the middle of an array initialization.  For
example, the following is not allowed:

#declare SplineData = array[6]
{ <.6,1,-.1>,        <.54,1,-.6>,    <.5,.35,-.9>,  <.6,.35,-1.25>,
   <.6,.35,-1.65>, #declare a = 0.7;  <.3, a, -.73> }

Later in that section, it says:
"However if you attempt to re-declare an identifier as anything other than
its original type, it will generate a warning message."

This is no longer true.

In section 6.2.2.4, the line "See also "The #ifdef and #ifndef Directives""
is not a hyperlink.

--
Mark


Post a reply to this message

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