| Re: Parsing text files with standard words |
|
 |
|
 |
|
 |
|
 |
Group: comp.lang.forth · Group Profile
Author: cooscoos Date: Sep 18, 2008 13:11
Op Thu, 18 Sep 2008 12:55:58 -0700 (PDT) schreef Gerry:
>>>Also it precludes a
>>>design where an application opens a file source and then returns
>>>to whatever called it to parse and process the file.
>>
>> No. EXECUTE-PARSING-FILE takes a file-id, so your application would
>> open the file, then pass the resultin file-id to its caller, which
>> would then call EXECUTE-PARSING-FILE.
>>
>
> Well yes, but the point I tried to make was that the caller of
> EXECUTE-PARSING-FILE loses control until the word executed
> (xyz-helper in your example) has completed, whereupon the file
> is closed. So the caller cannot process the file itself.
>
I don't understand this. The caller delegates the processing of the file to
xyz-helper via execute-parsing-file. So it's not the caller that performs
the processing. It's simple to rewrite xyz-helper to do what you want.
--
Coos
|