POV-Ray : Newsgroups : povray.general : Passing file handles to macros - how? : Re: Passing file handles to macros - how? Server Time
4 Aug 2024 14:28:57 EDT (-0400)
  Re: Passing file handles to macros - how?  
From: ABX
Date: 22 Apr 2003 07:38:14
Message: <e9aaavsue4kuqvdg5tsdbrje3nm3tek68v@4ax.com>
On Tue, 22 Apr 2003 13:16:16 +0300, Peter Popov <pet### [at] vipbg> wrote:
> > I have no idea but I imagine you can workaround it with passing it as string and
> > Parse_String() macro.
>
> In this case the file handle should be global, which doesn't help
> much.

You mean this working workaround does not help you ?

  #include "strings.inc"

  #macro Write(File_Handle)
    #write( Parse_String(File_Handle) , "test")
  #end

  #fopen ID1 "test1.txt" write
    Write("ID1")
  #fclose ID1
  #fopen ID2 "test2.txt" write
    Write("ID2")
  #fclose ID2

ABX


Post a reply to this message

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