From: Christian Froeschlin
Subject: Re: Simulated urbanism macro scene: version 2013.03.29
Date: 29 Mar 2013 15:56:36
Message: <5155f1f4@news.povray.org>
I haven't used this, but is there a specific reason why the macro
returns the result in a fixed variable name? If you simply write
union {
object {HouseBlock}
object {Single}
}
without #declare you can use the macro like this
#declare HouseBlock = Urbanism(
...
)
or like this
object
{
Urbanism(...)
textures {...}
}
Also there are some other uses of #declare in the macro
that are probably intended to be #local.
Not a criticisms, just a general observation that coding is
usually less confusing if something you call "returns a value"
as opposed to having "side effects".
From: Thomas de Groot
Subject: Re: Simulated urbanism macro scene: version 2013.03.29
Date: 30 Mar 2013 04:07:56
Message: <51569d5c$1@news.povray.org>
On 29-3-2013 20:56, Christian Froeschlin wrote:
> I haven't used this, but is there a specific reason why the macro> returns the result in a fixed variable name? If you simply write>> union {> object {HouseBlock}> object {Single}> }>> without #declare you can use the macro like this>> #declare HouseBlock = Urbanism(> ...> )>> or like this>> object> {> Urbanism(...)> textures {...}> }
You are perfectly right on this. No reason at all for my particular
choice ;-)
>> Also there are some other uses of #declare in the macro> that are probably intended to be #local.
This is different. Those #declare are exchanged between the two macros.
#local does not work in that case.
>> Not a criticisms, just a general observation that coding is> usually less confusing if something you call "returns a value"> as opposed to having "side effects".
Sure. However, I slightly prefer my method (your first comment) because
I like to have defined terms in my code most of the time.
Thomas
From: Thomas de Groot
Subject: Re: Simulated urbanism macro scene: version 2013.03.29
Date: 30 Mar 2013 04:44:32
Message: <5156a5f0$1@news.povray.org>
On 30-3-2013 9:07, Thomas de Groot wrote:
> On 29-3-2013 20:56, Christian Froeschlin wrote:>> Also there are some other uses of #declare in the macro>> that are probably intended to be #local.>> This is different. Those #declare are exchanged between the two macros.> #local does not work in that case.>
Eerr... Apart from those, there are some more #declare that could be
#local indeed ;-)
In due time. There will probably be more future changes...
Thomas