POV-Ray : Newsgroups : povray.beta-test : [scenes] woodmaps.inc : Re: [scenes] woodmaps.inc Server Time
30 Jul 2024 06:22:56 EDT (-0400)
  Re: [scenes] woodmaps.inc  
From: Warp
Date: 28 Jan 2002 18:08:34
Message: <3c55d9f1@news.povray.org>
Thorsten Froehlich <tho### [at] trfde> wrote:
: How could it know that the #if block ends at the end of the file without
: looking through the whole file?

  I think that it would be fair to _assume_ that block starts and ends are
always located in the same file. This probably will not break any logical
SDL script and is a very rational standard limitation to make.
  The big advantage of this is, of course, speed. If we are skipping a block
of code, we don't need to read any possible #includes in this block because
the specs say that there can't be anything interesting in the include anyways.

  I don't see any advantage of supporting the feature that, for example,
an #if starts in one file and the correspondent #end is in another file
(of course you could invent lots of artificial examples, but I don't think
there is any real useful example).

  The C preprocessor makes this assumption and it works just fine.

-- 
#macro N(D)#if(D>99)cylinder{M()#local D=div(D,104);M().5,2pigment{rgb M()}}
N(D)#end#end#macro M()<mod(D,13)-6mod(div(D,13)8)-3,10>#end blob{
N(11117333955)N(4254934330)N(3900569407)N(7382340)N(3358)N(970)}//  - Warp -


Post a reply to this message

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