Notifications
Clear all

[Closed] performance and memory usage of my script

you mean store filestream as an array? never thought we could store filestream into an array. sounds good. thanks i will try this

1 Reply
(@gravey)
Joined: 11 months ago

Posts: 0

You can store filestreams in an array but that’s not what I was trying to say. Having thought about it for slightly more than 2 seconds, I think that your array idea would work something like this:

global streams = #( (openFile "C:\\file1.txt" mode:"w"), (openFile "C:\\file2.txt" mode:"w") ) --etc

mapped fn layer_fn o = 
(
	local fstream
	case o of
	(
		"layer 1": (fstream = streams[1])
		"layer 2": (fstream = streams[2])
		--etc
	)
	--then do your code:
	format <string> to: fstream
)

thanks gravey…

Page 2 / 2