reading from / writing to file : 2 dumb questions
Richmond
richmondmathewson at gmail.com
Wed Sep 10 02:12:15 EDT 2014
On 10/09/14 07:27, Kay C Lan wrote:
> 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).
> **********
>
>
Just in case anybody missed 'it' the phrase:
"The dictionary is always 3 steps behind your brilliant mind and my
brilliant mind . . . LOL"
was meant ironically (well . . . at least with respect to my mind).
Richmond.
More information about the use-livecode
mailing list