POV-Ray : Newsgroups : povray.binaries.scene-files : Simulated urbanism macro scene: version 2013.03.29 : Re: Simulated urbanism macro scene: version 2013.03.29 Server Time
3 May 2024 00:32:26 EDT (-0400)
  Re: Simulated urbanism macro scene: version 2013.03.29  
From: Thomas de Groot
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


Post a reply to this message

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