Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!liuida!mikpe From: mikpe@majestix.ida.liu.se (Mikael Pettersson) Newsgroups: comp.lang.scheme Subject: (input-port? (close-input-port (open-input-file "/dev/null"))) ?? Summary: is section 6.10.1 of [R4RS] inconsistent? Message-ID: <1892@majestix.ida.liu.se> Date: 26 May 90 14:52:34 GMT Organization: CIS Dept, Univ of Linkoping, Sweden Lines: 35 From reading the R4RS (actually, the R3.99RS and the draft IEEE P1178/D4), section 6.10.1. Ports, one can obtain the following definitions: (A) [at the top] "..an input port is a Scheme object that can deliver characters upon command.." (B) [just below (close-input-port port)] "Closes the file associated with port, rendering the port incapable of delivering .. characters." (C) [next sentence below (close-input-port port)] "These routines have no effect if the file has already been closed." Now, from (A) and (B) it would seem that once a port has been closed, it ceases to be a port. On the other hand, (C) seems to imply the opposite. Maybe I'm nit-picking (probably :-)), but we don't want accidental undefinedness in the language definition, do we? [the report is otherwise pretty careful in describing what is and what is not undefined behavior] On a related issue: it's explicitly stated that "It is an error to read from a closed port.", but no such statement is made about trying to _write_ to a closed port.. what's the deal here? /Mike -- Mikael Pettersson, Dept of Comp & Info Sci, University of Linkoping, Sweden email: mpe@ida.liu.se or ...!{mcsun,munnari,uunet,unido,...}!sunic!liuida!mpe