guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: ice-9 r4rs


From: Ludovic Courtès
Subject: Re: ice-9 r4rs
Date: Wed, 19 Mar 2008 13:44:53 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Hi,

Sebastian Tennant <address@hidden> writes:

> (info "(guile-1.8)File Ports")
>
>    -- Scheme Procedure: open-input-file filename
>        Open FILENAME for input.  Equivalent to
>             (open-file FILENAME "r")
>
>    -- Scheme Procedure: open-output-file filename
>        Open FILENAME for output.  Equivalent to
>             (open-file FILENAME "w")
>
> These procs are found in ice-9 r4rs.  The docs make no mention of this
> fact.

With Guile 1.8:

  $ guile
  guile> (help open-input-file)
  `open-input-file' is a procedure in the (guile) module.

  Takes a string naming an existing file and returns an input port
  capable of delivering characters from the file.  If the file
  cannot be opened, an error is signalled.
  guile> (help open-output-file)
  `open-output-file' is a procedure in the (guile) module.

  Takes a string naming an output file to be created and returns an
  output port capable of writing characters to a new file by that
  name.  If the file cannot be opened, an error is signalled.  If a
  file with the given name already exists, the effect is unspecified.
  guile> (procedure? open-input-file)
  #t
  guile> (procedure? open-output-file)
  #t

Both procedures are bound by default.

Which version of Guile are you using?

Thanks,
Ludovic.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]