POV-Ray : Newsgroups : povray.newusers : Problem with #switch : Re: Problem with #switch Server Time: 20 Nov 2008 12:21:11 GMT
  Re: Problem with #switch  
From: Warp
Date: 12 Feb 2008 16:27:06
Mike the Elder <nomail@nomail> wrote:
> #macro NextX(X,Dir)
>    #switch(Dir)
>       #case(0)
>       #case(1)
>          #declare RetXVal = X+1;
>       #break
>       #case(2)
>          #declare RetXVal = X;
>       #break
>       #case(3)
>       #case(4)
>          #declare RetXVal = X-1;
>       #break
>       #case(5)
>          #declare RetXVal = X;
>       #break
>    #end
> #end

  No, not like that. Use #local and put the identifier name at the end
of the macro.

-- 
                                                          - Warp


Post a reply to this message

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