POV-Ray : Newsgroups : povray.bugreports : #local 'bug' cripples usefulness : Re: #local 'bug' cripples usefulness Server Time
28 Sep 2024 11:04:59 EDT (-0400)
  Re: #local 'bug' cripples usefulness  
From: Dan Connelly
Date: 26 Sep 1998 09:23:09
Message: <360CDC9A.FA6A3850@flash.net>
Philippe Debar wrote:
> 
> This problem greatly decreases the value of the #local declaration: you
> can't have a local identifier with a different data type from a same-named
> global identifier.
> 
> e.g. you can't:
> 
> (main file) #declare anItem=4;
> (include file) #local anItem="test"

This feature also exists in 3.1.watcom.win32.r1 ( Windows 95 ).

Note doing an #undef anItem  before #local prevents the error
message.

An example of an error-generating file :

------- local_test.pov -------------
#declare a = pigment { color rgb 0.5 } 

#include "local_test.inc"

camera { location 3 look_at 0 }
light_source { 4 color 1 }
sphere { 0, 1 pigment { a } }
------------------------------------

------- local_test.inc -------------
#local a = 4;   // this line generates an error
------------------------------------

Dan
PII 128MB W95

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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