POV-Ray : Newsgroups : povray.general : using a charact as #macro paramater? : Re: using a charact as #macro paramater? Server Time
7 Aug 2024 15:15:40 EDT (-0400)
  Re: using a charact as #macro paramater?  
From: Steve
Date: 27 Aug 2001 17:13:50
Message: <slrn9oldkl.uau.steve@zero-pps.localdomain>
On Mon, 27 Aug 2001 15:28:35 -0500, Chris Huff wrote:
>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"))
>    ...

Thanks Chriss, but I've already rewritten it to use all numbers, some how 
55 isn't as intuitive as E5, particularly when looking at the chess board
in fron of me. 

At the moment I'm just commenting each call to the macro // D4 just to help
me know where things are. 

--
Cheers
Steve              email mailto:ste### [at] zeroppsuklinuxnet

%HAV-A-NICEDAY Error not enough coffee  0 pps. 

web http://www.zeropps.uklinux.net/

or  http://start.at/zero-pps

 10:05pm  up 45 days, 9 min,  2 users,  load average: 1.05, 1.04, 1.01


Post a reply to this message

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