POV-Ray : Newsgroups : povray.general : Is it possible to convert a text string to a Macro Identifier ??? : Re: Is it possible to convert a text string to a Macro Identifier??? Server Time
1 Aug 2024 16:30:01 EDT (-0400)
  Re: Is it possible to convert a text string to a Macro Identifier???  
From: Jim Charter
Date: 15 Aug 2005 11:59:53
Message: <4300bbf9$1@news.povray.org>
This seems to work:

#include "strings.inc"
#include "colors.inc"


#macro Lights ()
         light_source { <100,1000,-1000>, White}
#end

#macro Camera ()
         camera { location <0,1,-16>  look_at <0,0,0>}
#end

#macro Action ()
         sphere { 0, .5 pigment { Red } }
#end

#fopen MyFile "FILEIO5.TXT" write 

#write (MyFile,"\"Lights\",\"Camera\",\"Action\"")
#fclose MyFile

#fopen MyFile "FILEIO5.TXT" read

#read (MyFile,Name1,Name2,Name3)

Parse_String (Name1) ()
Parse_String (Name2) ()
Parse_String (Name3) ()

#fclose MyFile


Post a reply to this message

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