POV-Ray : Newsgroups : povray.newusers : Chicken or the egg? Server Time
25 Dec 2024 01:21:06 EST (-0500)
  Chicken or the egg? (Message 1 to 5 of 5)  
From: LibraryMan
Subject: Chicken or the egg?
Date: 13 Dec 2002 16:31:36
Message: <3DFA51CE.574CF362@att.net>
I just discovered I declared the same object twice, both in the actual
POV file and once in one of its INC files.  Which version is taking
precedence?  (I'm not getting any error messages about it).
Thanks!
Mark (aka LibraryMan)


Post a reply to this message

From: Red Golpe
Subject: Re: Chicken or the egg?
Date: 13 Dec 2002 17:05:29
Message: <3dfa59a9@news.povray.org>
The POV file should take precedence. However, try changing slightly one of
them and it'll be easy to discover the truth.

--

                                    Red Golpe

_____________________________________________

"What doesn't kill you... makes you stronger"
  Jean-Baptiste Emmanuel Zorg

http://redgolpe.com

____________________________________________

"LibraryMan" <mrm### [at] attnet> ha scritto nel messaggio
news:3DFA51CE.574CF362@att.net...
> I just discovered I declared the same object twice, both in the actual
> POV file and once in one of its INC files.  Which version is taking
> precedence?  (I'm not getting any error messages about it).
> Thanks!
> Mark (aka LibraryMan)


Post a reply to this message

From: Christopher James Huff
Subject: Re: Chicken or the egg?
Date: 13 Dec 2002 17:35:37
Message: <chrishuff-D70DB6.17315813122002@netplex.aussie.org>
In article <3DFA51CE.574CF362@att.net>, LibraryMan <mrm### [at] attnet> 
wrote:

> I just discovered I declared the same object twice, both in the actual
> POV file and once in one of its INC files.  Which version is taking
> precedence?  (I'm not getting any error messages about it).

Assuming you didn't use #local, whichever one is reached last. A 
declaration replaces a previous declaration with the same name and scope.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

From: Admiral Justin
Subject: Re: Chicken or the egg?
Date: 15 Dec 2002 14:08:58
Message: <3dfcd34a$1@news.povray.org>
LibraryMan wrote:
> I just discovered I declared the same object twice, both in the actual
> POV file and once in one of its INC files.  Which version is taking
> precedence?  (I'm not getting any error messages about it).
> Thanks!
> Mark (aka LibraryMan)

Well, try making a subtle, yet noticable change in one, and see if it 
changes.


Post a reply to this message

From: TinCanMan
Subject: Re: Chicken or the egg?
Date: 16 Dec 2002 17:56:26
Message: <3dfe5a1a@news.povray.org>
"LibraryMan" <mrm### [at] attnet> wrote in message
news:3DFA51CE.574CF362@att.net...
> I just discovered I declared the same object twice, both in the actual
> POV file and once in one of its INC files.  Which version is taking
> precedence?  (I'm not getting any error messages about it).
> Thanks!
> Mark (aka LibraryMan)

Whichever came last.

If the object is declared in the scene after the .inc is #included, the .pov
object will be used, or if the #include is after the declared object, the
.inc one is used.

-tgq


Post a reply to this message

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