file.close
Syntax
- b = file.close(<f>)
Close a file. The most recently opened file is closed if no arguments are provided.
Usage Example
The following example illustrates how file.close
can be used
model new
zone create brick size 2 2 2
fish define output_gps
local f = file.open("gps.txt","write","text")
local l = list
loop foreach local g gp.list
local a = string.build("%1,%2,%3,%4", gp.id(g), ...
gp.pos(g)->x, gp.pos(g)->y, gp.pos(g)->z)
l = list.append(l,a)
endloop
file.write(f,l)
file.close(f)
end
[output_gps]
Was this helpful? ... | Itasca Software © 2024, Itasca | Updated: Dec 14, 2024 |