POV-Ray : Newsgroups : povray.programming : #ifdef(array[index]) : Re: #ifdef(array[index]) Server Time
29 Jul 2024 02:22:38 EDT (-0400)
  Re: #ifdef(array[index])  
From: Dan Connelly
Date: 25 Oct 1998 19:39:48
Message: <3633C497.75505AC5@flash.net>
It's quite possible.

Use file i/o to generate an .inc file, then include
it.

But it would get ugly....

Dan

Wayne Gordon wrote:
> 
> Ronald L. Parker wrote:
> >
> > On Sat, 24 Oct 1998 18:19:12 -0500, Wayne Gordon <way### [at] phoenixnet>
> > wrote:
> >
> > >> or, alternatively, some way to convert strings to identifiers, like
> > >> this:
> > >
> > >Impossible.
> >
> > Not impossible.  Just not useful except as a workaround for the lack
> > of other data types.  For examples of languages that can do this (but
> > in which most people wisely choose not to) see Perl or Lisp and look
> > at the 'eval' function.
> 
> I meant that it was impossible to do in POV's scripting language
> right now, not necessarily impossible in another language. POV can
> convert the contents of a string to a numerical value and assign
> that value to a variable, but it is not possible to convert a string
> to an identifier as was asked.

-- 
http://www.flash.net/~djconnel/


Post a reply to this message

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