Re: Saving a sequence
- Posted by GreenEuphorian Jan 23, 2015
- 1335 views
ghaberek said...
Euphoria has built-in serialization routines. I would say this is the "standard" way of doing so.
These routines are (basically) what EDS uses to store objects in database files, which is also a "standard" way of storing a lot of Euphoria objects on disk in an organized manner.
integer fh fh = open("cust.dat", "wb") puts(fh, serialize(FirstName)) puts(fh, serialize(LastName)) puts(fh, serialize(PhoneNumber)) puts(fh, serialize(Address)) close(fh) fh = open("cust.dat", "rb") FirstName = deserialize(fh) LastName = deserialize(fh) PhoneNumber = deserialize(fh) Address = deserialize(fh) close(fh)
-Greg
The manual's explanation is very terse, almost nonexistent.
Could someone please provide some more explanation?
Thanks