reading from / writing to file : 2 dumb questions
Kay C Lan
lan.kc.macmail at gmail.com
Wed Sep 10 00:27:44 EDT 2014
On Wed, Sep 10, 2014 at 2:20 AM, Richmond <richmondmathewson at gmail.com> wrote:
> On 09/09/14 21:18, jbv at souslelogo.com wrote:
>>>
>> Yes, that's straightforward as long as you stick to a simple
>> open file / write / close file operation.
>> Maybe the existence of a pointer, as mentioned by Jacques
>> should be added to the dictionary...
>
>
> The dictionary is always 3 steps behind your brilliant mind and my brilliant
> mind . . . LOL
>
Oh, I don't know the 3 starred items in the Dictionary seem to have
your steps covered. The Dictionary may use the term 'start' rather
than 'pointer', but it's pretty comprehensive in it's description of
it's existence and how write to file works and why jbv got the result
he did:
**********
write value to {file pathName | stdout} [at {start | EOF | end}]
...
The start specifies the character or byte position in the file where
you want to begin writing. A positive number begins start characters
after the beginning of the file; a negative number begins start
characters before the end of the file.
If you specify either of the synonyms EOF or end, the write begins
after the last character in the file.
If you don't specify a start, the write begins:
* at the position determined by the seek command, or
* if you haven't used the seek command, wherever the last read from
file or write to file command to the file left off, or
* if you haven't accessed the file with read from file or write to
file since it was opened, after the last character (if the file was
opened in append mode) or at the first character (if the file was
opened in any other mode).
**********
More information about the use-livecode
mailing list