POV-Ray : Newsgroups : povray.beta-test : Texture declared inside macro needs semicolon Server Time
1 Nov 2024 23:17:12 EDT (-0400)
  Texture declared inside macro needs semicolon (Message 1 to 3 of 3)  
From: Hugo
Subject: Texture declared inside macro needs semicolon
Date: 12 Feb 2002 08:58:00
Message: <3c691f68$1@news.povray.org>
I spent over an hour to locate a bug in my SDL code... There is none! But I
found that adding a semicolon after declaring my texture fixes the problem..
How comes this?  Maybe I'm just not aware of this new development - that
semicolons after texture declarations keeps the parser from being confused..
Is this behaviour intentional?  Here's an example:

#macro Define_Plastic( Pigment_1 )

 #local Plastic=texture { pigment { rgb 1 }
  }; // SEMICOLON FIXES THE PROBLEM

 Plastic
#end

#local White_Plastic=Define_Plastic( 1 )


Regards,
Hugo


Post a reply to this message

From:
Subject: Re: Texture declared inside macro needs semicolon
Date: 12 Feb 2002 09:07:08
Message: <178i6ughk9j2j77uiimdlqkfevb8169pmh@4ax.com>
On Tue, 12 Feb 2002 15:04:25 +0100, "Hugo" <hua### [at] post3teledk> wrote:
> Is this behaviour intentional?

Probably. Just check how layered texture can be created.

ABX


Post a reply to this message

From: Ron Parker
Subject: Re: Texture declared inside macro needs semicolon
Date: 12 Feb 2002 10:05:57
Message: <slrna6ibqn.ocj.ron.parker@fwi.com>

> On Tue, 12 Feb 2002 15:04:25 +0100, "Hugo" <hua### [at] post3teledk> wrote:
>> Is this behaviour intentional?
> 
> Probably. Just check how layered texture can be created.

That semicolons can now be used to disambiguate layered texture declarations
from other textures that just happen to be adjacent is something that just
came for free with the change that allows semicolons after any #declares.
So was it intentional?  Sorta.

-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

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