Write to file at end

Bob Sneidar bobsneidar at iotecdigital.com
Thu Jan 19 12:58:30 EST 2017


Hmmm... 

I inserted 

read from file "Forms Generator 8 Crash Log.txt" until EOF 

before the writes, then removed "at end" from the write commands. IT STILL overwrites the entire file! 

It looks like the open file command is wiping the file before any writes happen! Is this normal??

Bob S


> On Jan 19, 2017, at 09:53 , Bob Sneidar via use-livecode <use-livecode at lists.runrev.com> wrote:
> 
> Hi all. 
> 
> Given code snippet:
> 
> open file "Forms Generator 8 Crash Log.txt" for write
> write formatDate(the date, "sql date") && formatTime(the long time, "sql time") & cr \
> to file "Forms Generator 8 Crash Log.txt" at end
> write tContexts & cr to file "Forms Generator 8 Crash Log.txt" at end
> close file "Forms Generator 8 Crash Log.txt"
> 
> Shouldn't this APPEND to the file? It's replacing the contents of the file instead. If it's a bug I'll report it. I can always read until EOF to do the same thing. 
> 
> Bob S
> 
> 
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list