Re: Saving a sequence

new topic     » goto parent     » topic index » view thread      » older message » newer message
GreenEuphorian said...

A recent contribution to the Archive (the XML-to-sequence library) made me wonder about the ways of saving sequences to disk, for later retrieval. Is there a standard way of doing it? And is there anything like sequence-to-XML or similar?

Thanks

Green Euphorian

The standard way is to use print and get from std/get.e. These store in a kind of ASCII format. I say "kind of" because you can store any sequence this way not just ASCII strings.

output:

print(fd, obj) 
puts(fd, 10) 

input:

obj = get(fd) 

I sometimes had problems when I didn't add a newline after printing.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu