POV-Ray : Newsgroups : povray.general : shapes2.inc error Server Time
1 Aug 2024 18:22:57 EDT (-0400)
  shapes2.inc error (Message 1 to 7 of 7)  
From: Alf Peake
Subject: shapes2.inc error
Date: 19 May 2005 16:45:52
Message: <428cfb00@news.povray.org>
This line:
#include "shapes2.inc"

produces this message:
...\shapes2.inc  Line: 103
File Context (5 lines):
  intersection
   {object {Cone_Y
Parse Error: Expected 'object', undeclared identifier 'Cone_Y' found 
instead

Version 3.6.1a.icl8.win32,  WinXP SP2, P4 2.8

-- 
Alf
Old dog still learning - please don't shoot yet.


Post a reply to this message

From: JYR
Subject: Re: shapes2.inc error
Date: 19 May 2005 22:00:01
Message: <web.428d4433153e99616a3607400@news.povray.org>
Alf Peake <ger### [at] ricinwales> wrote:
> This line:
> #include "shapes2.inc"

expand it to :
#include "shapes.inc"
#include "shapes2.inc"

.... it should now work.
JYR


Post a reply to this message

From: Alf Peake
Subject: Re: shapes2.inc error
Date: 20 May 2005 07:36:58
Message: <428dcbda@news.povray.org>
JYR wrote:
> Alf Peake <ger### [at] ricinwales> wrote:
> 
>>This line:
>>#include "shapes2.inc"
> 
> 
> expand it to :
> #include "shapes.inc"
> #include "shapes2.inc"
> 
> ..... it should now work.
> JYR
> 
> 

Yes, I know that ;) but I feel an *.inc file should not depend on 
another file to work. I was trying some of my old pov files, and took 
a while to figure out the error :-[

-- 
Alf
Old dog still learning - please don't shoot yet.


Post a reply to this message

From: Alain
Subject: Re: shapes2.inc error
Date: 20 May 2005 16:29:52
Message: <428e48c0$1@news.povray.org>
Alf Peake nous apporta ses lumieres en ce 2005-05-20 13:36:
> JYR wrote:
> 
>> Alf Peake <ger### [at] ricinwales> wrote:
>>
>>> This line:
>>> #include "shapes2.inc"
>>
>>
>>
>> expand it to :
>> #include "shapes.inc"
>> #include "shapes2.inc"
>>
>> ..... it should now work.
>> JYR
>>
>>
> 
> Yes, I know that ;) but I feel an *.inc file should not depend on 
> another file to work. I was trying some of my old pov files, and took a 
> while to figure out the error :-[
> 
You may add this line to shapes2.inc:
#include "shapes.inc"
That way, you don't need to remember to include that file..,
I agree with you, any *.inc file that need another one should include it.

Alain


Post a reply to this message

From: Rune
Subject: Re: shapes2.inc error
Date: 21 May 2005 04:27:16
Message: <428ef0e4@news.povray.org>
Alain wrote:
> You may add this line to shapes2.inc:
> #include "shapes.inc"
> That way, you don't need to remember to include that file..,
> I agree with you, any *.inc file that need another one should
> include it.

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!

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

From: Warp
Subject: Re: shapes2.inc error
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

From: Rune
Subject: Re: shapes2.inc error
Date: 21 May 2005 05:38:57
Message: <428f01b1$1@news.povray.org>
Warp wrote:
>  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.

Ah yes, I had forgotten that this technique is default in the standard 
include files. Well I guess it would indeed prevent some confusion if 
shapes.inc was included in shapes2.inc.

Rune
-- 
3D images and anims, include files, tutorials and more:
rune|vision:  http://runevision.com
POV-Ray Ring: http://webring.povray.co.uk


Post a reply to this message

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