reading from / writing to file : 2 dumb questions

Richmond richmondmathewson at gmail.com
Tue Sep 9 14:12:05 EDT 2014


On 09/09/14 19:58, jbv at souslelogo.com wrote:
> Richmond,
> Thanks for your reply.
> Yes, I perfectly understand what happens, but my point is :
> why is it so ? What is the logic behind ?
> Is it specific to LC of is it closely related to the different OSes
> on which LC runs ?
> Why the fact of closing then reopening a file leads to overwriting
> its content ?
>
> Best,
> jbv
>
>
>
  No; it isn't very logical. Ask Kevin Miller or Dr Scott Ranier.

Why is it so? Dunno, and don't really care; after all
once one has worked out that is the the things are one works with those 
things.

I think you will find this is a cross-platform "problem".

Here's what is written in the dictionary:

"write "one 222" to file tFile -- Writes to the start of the file
    write "two" to file tFile at 4 -- Writes to the file from character 4
    write " three" to file tFile at EOF -- Writes to the end of the file
    write " four" to file tFile at end -- Writes to the end of the file"

which seems quite straightforward.

Richmond.




More information about the use-livecode mailing list