APPEND appends data to a FILE! to write to a file.
FILE-IO GENERAL-IO
APPEND destination value
destination - FIle handle
value - value to append to the FILE!
/LINE - Add a NEW-LINE at the end
APPEND appends data to a FILE! to write to a file.
Here APPEND is used to write the data in the svg-start string to the file that was opened using the file handle fhandle-out
outputfile: ./myoutput.txt
if not fhandle-out= try OPEN/NEW outputfile [
write/line "Not able to open output file"
bye
]
svg-start: {Here is that important data
that must be saved in an output file!
}
append fhandle-out svg-start
If you need to output multiple separate data items and want to or can combine to a single action you can do
append fhandle-out data-item-1
| append data-item-2
| append data-item-3
Or even do it like this
fhandle-out
| append data-item-1
| append data-item-2
| append data-item-..