Problems with arrayencode/decode

Peter Haworth pete at lcsql.com
Wed Jan 2 21:55:54 EST 2013


I'm writing an arrayencoded array to a disk file using write to file.  When
I read the file back into memory with read from file until EOF and then try
to arraydecode it, I get a runtime error "arraydecode:failue".  In debug, I
can see data appear in it right after the read.

I've tried all possible combinations of reading/writing binary and also
base64encoding the arrayencoded array. Same result every time.

The only thing I think might be a problem is that after reading the file,
the result is set to "eof".  It's a little hard to tell from the
dictionary whether I should expect that when I tell the read to read until
eof.  If it is an indication that the read encountered eof before
completing, I can see that the arraydecode would fail but I'm not sure why
that would happen.

Any ideas?

Pete
lcSQL Software <http://www.lcsql.com>



More information about the use-livecode mailing list