POV-Ray : Newsgroups : povray.programming : Eval in POV-ray : Eval in POV-ray Server Time
29 Jul 2024 10:25:26 EDT (-0400)
  Eval in POV-ray  
From: Nikodemus Siivola
Date: 9 Sep 2001 08:29:51
Message: <3b9b60bf$1@news.povray.org>
Something I miss: eval directive that would evaluate the string given to
it as an SDL statement.

It isn't too hard to write a macro that does it:

#macro Eval( string )

 #fopen TMP "eval_file.tmp" write
 #write( TMP, string )
 #fclose TMP
 #include "eval_file.tmp"

#end

, but it sure ain't pretty...

Is there a better way to do this? Or is there a directive I have missed?

Of equal value would be a way to pass commands to the system, but aside
from the INI-options I cannot for the life of me figure out how to do it.

The reason I am crossposting this to povray.programming is because I
woudn't mind having a knowledgeable answer to the difficulty of
implementing such eval and system directives in povray-proper.

I have a reasonable background in programming, including some knowledge of
interpreters, but no familiarity what-so-ever with the povray source.

 -- Nikodemus


Post a reply to this message

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