POV-Ray : Newsgroups : povray.general : Can I not pass a file to a macro? : Re: Can I not pass a file to a macro? Server Time
29 Jul 2024 12:23:41 EDT (-0400)
  Re: Can I not pass a file to a macro?  
From: B  Gimeno
Date: 5 Aug 2011 20:05:00
Message: <web.4e3c85083ab75a423ab9fa310@news.povray.org>
A variation in which you can enter the output filename as a paremeter.

 #macro Write_something (file_name,N)
    #fopen F file_name write
    #write (F,N)
    #fclose F
 #end


 Write_something ("test.txt","Hello, world.\n")


By the way, is there a powerful and unavoidable reason to introduce as a
parameter the id_file handler?

Regards
B. Gimeno


Post a reply to this message

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