POV-Ray : Newsgroups : povray.general : using a charact as #macro paramater? : Re: using a charact as #macro paramater? Server Time
7 Aug 2024 15:21:16 EDT (-0400)
  Re: using a charact as #macro paramater?  
From: Chris Huff
Date: 27 Aug 2001 16:32:24
Message: <chrishuff-599533.15283527082001@netplex.aussie.org>
In article <slr### [at] fwicom>,
 ron### [at] povrayorg (Ron Parker) wrote:

> The problem isn't the macro, it's the switch.  Switches don't work with
> strings.  You can either use a chain of #if...#else #if...#else statements,
> or you can switch to using numbers instead of letters.

You might do the latter using the asc() function:

#switch(asc(Choice))
    #case(asc("A"))
    ...

-- 
Christopher James Huff - chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/

<><


Post a reply to this message

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