POV-Ray : Newsgroups : povray.advanced-users : variables in sdl : Re: variables in sdl Server Time: 20 Jul 2008 11:30:33 GMT
  Re: variables in sdl  
From: Mike Williams
Date: 23 Jan 2008 10:21:08
In most languages there'd be an eval() statement.

In POV SDL there's a nasty Parse_String() macro in strings.inc

#include "strings.inc"

#declare var0 = "foo";
#declare var1 = "bar";
#declare var2 = "baz";

#declare J=0;
#while (J<3)
   #declare A = concat("var",str(J,1,0));
   #debug concat(Parse_String(A),"\n")
   #declare J=J+1;
#end


It is much nicer, and more efficient, to create var as an array and use 
var[J].

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

Copyright 1991-2004 POV-Team™