|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |
| |
|
|
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
|
|
| |
| |
|
|
|
|
| |