POV-Ray : Newsgroups : povray.general : using duplicate #include files-- any problems? : using duplicate #include files-- any problems? Server Time
6 Oct 2024 09:13:30 EDT (-0400)
  using duplicate #include files-- any problems?  
From: Kenneth
Date: 22 Apr 2014 20:30:01
Message: <web.535708ab8dde86b0c2d977c20@news.povray.org>
This is one of those questions that I should have asked years ago, but never got
around to it: Does inserting duplicate #include files into a scene cause any
hidden problems? Or extra memory usage? Not that I've noticed anything so far,
I'm just curious (especially regarding macros, and/or defined functions that may
need to be undefined first before being re-#included.)

This would be a 'typical' example...

#include "math.inc"
#include "transforms.inc"
#include "shapes.inc"  // this also has math.inc and transforms.inc

Over the years, I've seen a few newsgroup posts that essentially say: Don't do
this. But aside from 'bad coding practice', is is harmful? I would assume that
using all #locals in the #included files (vs. #declares) would eliminate any
problems(?)

It would be nice to have a definitive answer, though. (I've never seen an
explanation or caveat in the documentation, regarding this.)


Post a reply to this message

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