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:25:06 EDT (-0400)
  Re: Can I not pass a file to a macro?  
From: B  Gimeno
Date: 5 Aug 2011 19:50:00
Message: <web.4e3c80943ab75a423ab9fa310@news.povray.org>
> When I run:
>
> #version 3.7;
>
> global_settings { assumed_gamma 1 }
>
> #macro Write_something (N, FileID)
>    #write (FileID, N)
> #end
>
> #fopen F "test.txt" write
> Write_something ("Hello, world.\n", F)
> #fclose F

I dunno why, but I cant pass either the fileid as parameter

 #version 3.7;
 global_settings { assumed_gamma 1 }
  #macro Write_something (N)
    #write (f,concat(N))
 #end

#fopen f "test.txt" write

 Write_something ("Hello, world.\n")

I hope to serve this at the moment, removing the fileid parameter

B. Gimeno


Post a reply to this message

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