The following Request for Interpretation from Anton Ertl is recognized as Q0010. Greg Bailey is assigned to draft the TC's response. Discussion on x3j14 list please. Greg Bailey | ATHENA Programming, Inc | 503-295-7703 | ---------------- | 310 SW 4th Ave Ste 530 | fax 295-6935 | greg@minerva.com | Portland, OR 97204 US | -----Original Message----- From: anton@mips.complang.tuwien.ac.at [SMTP:anton@mips.complang.tuwien.ac.at] Sent: Sat 18 Jan 97 05:34 To: x3j14@minerva.com Subject: RFI: Interaction of INCLUDE-FILE and QUERY >From the standard: 6.2.2040 QUERY .. Make the user input device the input source. Receive input into the terminal input buffer, replacing any previous contents. Make the result, whose address is returned by TIB, the input buffer. Set >IN to zero. 11.6.1.1717 INCLUDE-FILE .. Remove fileid from the stack. Save the current input source specification, including the current value of SOURCE-ID. Store fileid in SOURCE-ID. Make the file specified by fileid the input source. Store zero in BLK. Other stack effects are due to the words included. Repeat until end of file: read a line from the file, fill the input buffer from the contents of that line, set >IN to zero, and interpret. Text interpretation begins at the file position where the next file read would occur. When the end of the file is reached, close the file and restore the input source specification to its saved value. .. Similar wording can also be found in 11.6.1.1718 INCLUDED My question is: what happens, if I include a file, and while it is being included, QUERY is executed (e.g., because the text interpreter encounters "QUERY" in interpretation state). What seems clear to me, is: the user types in a line, and the text interpreter interprets that line. If refill is executed during that interpretation, the user has to type in another line. What's not so clear to me is, what happens when the text interpreter reaches the end of the line input by the user? The wording above seems to imply that the TIB stays the input buffer, that the user input device stays the input source (which plays a role in the case REFILL is executed), and that INCLUDE-FILE now reads from the file into the TIB and interprets that. This also implies that INCLUDE-FILE cannot use REFILL for reading from the file. Is this really the correct interpretation of the standard? If not, what is the correct interpretation? - anton