POV-Ray : Newsgroups : povray.programming : #ifdef(array[index]) : Re: #ifdef(array[index]) Server Time
29 Jul 2024 02:34:36 EDT (-0400)
  Re: #ifdef(array[index])  
From: Wayne Gordon
Date: 26 Oct 1998 16:27:47
Message: <3634EA47.4804@phoenix.net>
Dan Connelly wrote:
> 
> It's quite possible.
> 
> Use file i/o to generate an .inc file, then include
> it.

Ahhh, yes. I dind't think of this, obviously. I stand corrected.

> 
> But it would get ugly....

Indeed.

> 
> 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.