POV-Ray : Newsgroups : povray.general : Passing file handles to macros - how? : Passing file handles to macros - how? Server Time
5 Nov 2024 11:19:01 EST (-0500)
  Passing file handles to macros - how?  
From: Peter Popov
Date: 22 Apr 2003 04:47:08
Message: <1ev9avov9b6hkd269fm74okpsdfq31kpg1@4ax.com>
The following code generates this error:

Write(FileHandle <----ERROR
Parse Error: Expected 2 parameters but only 0 found.

#macro Write (File, Doodle)
  #write (File, Doodle)
#end

#fopen FileHandle "c:\\1.txt" write
Write(FileHandle,1)
#fclose FileHandle

While the following code generates this error:

Write(1, FileHandle <----ERROR
Parse Error: Expected 2 parameters but only 1 found.

#macro Write (Doodle, File)
  #write (File, Doodle)
#end

#fopen FileHandle "c:\\1.txt" write
Write(1, FileHandle)
#fclose FileHandle

My question is: can I pass file handles as parameters to macros, and
if yes, how?


Peter Popov ICQ : 15002700
Personal e-mail : pet### [at] vipbg
TAG      e-mail : pet### [at] tagpovrayorg


Post a reply to this message

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