|
 |
On 2025-06-19 09:39 (-4), Chris R wrote:
>
> Follow-up question: it appears you can't pass file handles as parameters to
> macros. No tricks for that either?
Here's my workaround:
---%<-----%<-----%<---[BEGIN CODE]---%<-----%<-----%<---
#macro Write_something (Filename, N)
#fopen F Filename append
#write (F, N)
#fclose F
#end
#declare FILE1 = "test.txt"
#fopen F FILE1 write #fclose F //zero the output file
Write_something (FILE1, "Hello,\n")
Write_something (FILE1, "world.\n")
--->%----->%----->%----[END CODE]---->%----->%----->%---
Post a reply to this message
|
 |