|
|
|
|
|
|
| |
| |
|
|
|
|
| |
| |
|
|
I want to make it easy to write out my data to a file, using a macro
like:
write_it(my_var)
which would envoke:
#fopen myfile "abn.data" append
#write(myfile,"my_var = ",my_var,"\n")
#fclose myfile
So my_var is output verbatim, then with its current value. How can I do
this?
--
Kaveh
Post a reply to this message
|
|
| |
| |
|
|
From: Thorsten Froehlich
Subject: Re: Using a word as a string and as a variable
Date: 8 Aug 2003 15:57:58
Message: <3f3400c6$1@news.povray.org>
|
|
|
| |
| |
|
|
In article <1fzdy3a.1uqiza819cf4ckN%kaveh@delete_this.focalimage.com> ,
kav### [at] delete_thisfocalimagecom (Kaveh) wrote:
> So my_var is output verbatim, then with its current value. How can I do
> this?
The short answer ould be you can't. The long answer would be to generate an
include file which does it for you. That is, pass the variable name as
string. Open an include file and write to it the three lines you quoted.
Then include that include file and it will output the variable for you.
Thorsten
____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde
Visit POV-Ray on the web: http://mac.povray.org
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
Thorsten Froehlich <tho### [at] trfde> wrote:
[...]
> The short answer ould be you can't. The long answer would be to generate an
> include file which does it for you. That is, pass the variable name as
> string. Open an include file and write to it the three lines you quoted.
> Then include that include file and it will output the variable for you.
Wonderful. Thank you.
--
Kaveh
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
On Fri, 8 Aug 2003 18:35:07 +0100, kav### [at] delete_thisfocalimagecom (Kaveh)
wrote:
> I want to make it easy to write out my data to a file, using a macro
> like:
>
> write_it(my_var)
>
> which would envoke:
>
> #fopen myfile "abn.data" append
> #write(myfile,"my_var = ",my_var,"\n")
> #fclose myfile
>
> So my_var is output verbatim, then with its current value. How can I do
> this?
There is Parse_String macro available in include files of official 3.5
distribution.
ABX
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |