POV-Ray : Newsgroups : povray.newusers : File handle and macros : Re: File handle and macros Server Time
1 May 2025 19:20:13 EDT (-0400)
  Re: File handle and macros  
From: Bald Eagle
Date: 30 Apr 2025 13:25:00
Message: <web.68125bf97252bfd75e45bf3825979125@news.povray.org>
kurtz le pirate <kur### [at] freefr> wrote:

> So we can't pass a file handle as a parameter ?

https://wiki.povray.org/content/Reference:File_I/O_Directives



You can use ifdef and defined, so I'm wondering if it's just a special kind of
identifier that gets handled a little differently - just like things in the
scene parser get handled differently by the function VM.

Try assigning another identifier the value of your file handle.

#declare Temp = FILE_HANDLE_IDENTIFIER;

try sending its value to the debug stream

basically try operating on it in any way that you can think of, and then maybe
there's some sort of workaround that might be possible.

The other option is to use parse_string to use the literal name of the file
handle as a string argument to your macro, and then parse it _inside_ your macro
as an identifier.  Because the string and the identifier are two different
things.

- BW


Post a reply to this message

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