|
|
"Slime" <slm### [at] slimelandcom> wrote in message
news:3cf13aae$1@news.povray.org...
> > > Did this in effect mean that you couldn't open a filehandle outside a
> > macro
> > > and then write to the filehandle inside the macro?
> >
> > Yes.
>
>
> Well... I may be mistaken, but I believe this works:
>
> #macro dostuff()
> #write(MYFILE, "hi")
> #end
>
> #fopen MYFILE "myfile.txt" write
> dostuff()
> #fclose MYFILE
>
> You just can't pass the actual file handle to the macro, so you have to be
> able to pre-write the macro knowing what the filehandle will be named. A
> significant restriction, yes. Not horrible though.
Yes, unless there is a security problem with allowing handles to be passed
as macro parameters, there is no reason to prohibit it.
Regards,
John
Post a reply to this message
|
|