Re: Parsing text files with standard words
  Home FAQ Contact Sign in
comp.lang.forth only
 
Advanced search
POPULAR GROUPS

more...

 Up
Re: Parsing text files with standard words         

Group: comp.lang.forth · Group Profile
Author: coos
Date: Sep 18, 2008 13:11

Op Thu, 18 Sep 2008 12:55:58 -0700 (PDT) schreef Gerry:
> On 17 Sep, 21:32, an...@mips.complang.tuwien.ac.at (Anton Ertl) wrote:
>
> [...]
>
>>>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
no comments
diggit! del.icio.us! reddit!