POV-Ray : Newsgroups : povray.general : shapes2.inc error : Re: shapes2.inc error Server Time
1 Aug 2024 20:13:40 EDT (-0400)
  Re: shapes2.inc error  
From: Warp
Date: 21 May 2005 04:33:06
Message: <428ef241@news.povray.org>
Rune <run### [at] runevisioncom> wrote:
> But then you risk having certain include files, that many other include 
> files rely on, included several times.

> Not only does it slow down parsing - if there are function declarations in 
> the include, you will get an error when the same functions are attempted 
> declared for the second time!

  That's why there are #ifndefs and #declares at the beginning of the
include files. If the file is included a second time, the #ifndef will
skip it.

  If parsing speed is a worry then the #ifndef can be copied to be
around the #include command. That is, if an include file #includes
shapes.inc, then that inclusion could be written as:

#ifndef(SHAPES_INC_TEMP)
#include "shapes.inc"
#end

  This will somewhat speed up parsing.

-- 
                                                          - Warp


Post a reply to this message

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