POV-Ray : Newsgroups : povray.bugreports : String parameters in macros do not return value : Re: String parameters in macros do not return value Server Time
28 May 2024 19:47:42 EDT (-0400)
  Re: String parameters in macros do not return value  
From: Samuel van Egmond
Date: 2 Jun 1999 17:07:52
Message: <37558f18.0@news.povray.org>
Hi,

thanks, but this was just the simple version, I tried to use this in a
recursive macro where the string parameter gets 'eaten' one character at the
time.  I've already got a work around by not using a parameter but a global
#declare.  Just thought I'd better put in a bug report so others would not
spend the same time figuring out why their macro doesn't work.

   [ ][ ][ ]         [ ][ ][ ]      [ ]         [ ]
[ ]               [ ]         [ ]   [ ][ ]   [ ][ ]
   [ ][ ][ ]      [ ][ ][ ][ ][ ]   [ ]   [ ]   [ ]
            [ ]   [ ]         [ ]   [ ]         [ ]
   [ ][ ][ ]      [ ]         [ ]   [ ]         [ ]  ;-)

Nieminen Mika wrote in message <37553403.0@news.povray.org>...
>Samuel van Egmond <sam### [at] infabcom> wrote:
>: #macro TestString(String)
>:     #declare String = "Bye Now!"
>: #end
>
>: #local MyString = "Hello"
>: TestString(MyString)
>: #debug MyString
>
>  A workaround could be:
>
>#macro TestString()
>    "Bye Now!"
>#end
>
>#local MyString = TestString()
>#debug MyString
>
>--
>main(i,_){for(_?--i,main(i+2,"FhhQHFIJD|FQTITFN]zRFHhhTBFHhhTBFysdB"[i]
>):5;i&&_>1;printf("%s",_-70?_&1?"[]":" ":(_=0,"\n")),_/=2);} /*- Warp -*/


Post a reply to this message

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