Re: Saving sequences

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

I thought print() and get() where only able to store/retrieve data in a flat format, meaning that the sequence structure would be lost? Am I wrong?

print() and get() work perfectly fine with sequence data, no matter how complex. Perhaps where you're getting confused is that print saves strings as a sequence of integers, instead of human readable text. get() is quite happy to read either string literals or sequences of integers. If the first character of your file is the open brace ({), and the last character is the close brace (}), you only need a single get() to retrieve the entire file. If the file was created with print(), that's what you'll see. I recommend experimenting with this a bit so you can see it for yourself. Remember that get() returns {GET_SUCCESS | GET_FAIL,data}.

The file created with print() is ASCII, and can easily be interpreted by anyone who understands the ASCII table. If the project requires compression and obfuscation, use database.e.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu