DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

(guile.info.gz) SRFI-10

Info Catalog (guile.info.gz) SRFI-9 (guile.info.gz) SRFI Support (guile.info.gz) SRFI-11
 
 39.9 SRFI-10 - Hash-Comma Reader Extension
 ==========================================
 
 The module `(srfi srfi-10)' implements the syntax extension `#,()',
 also called hash-comma, which is defined in SRFI-10.
 
    The support for SRFI-10 consists of the procedure
 `define-reader-ctor' for defining new reader constructors and the read
 syntax form
 
      #,(CTOR DATUM ...)
 
    where CTOR must be a symbol for which a read constructor was defined
 previously, using `define-reader-ctor'.
 
    Example:
 
      (define-reader-ctor 'file open-input-file)
      (define f '#,(file "/etc/passwd"))
      (read-line f)
      =>
      "root:x:0:0:root:/root:/bin/bash"
 
    Please note the quote before the `#,(file ...)' expression.  This is
 necessary because ports are not self-evaluating in Guile.
 
  -- Scheme Procedure: define-reader-ctor symbol proc
      Define PROC as the reader constructor for hash-comma forms with a
      tag SYMBOL.  PROC will be applied to the datum(s) following the
      tag in the hash-comma expression after the complete form has been
      read in.  The result of PROC is returned by the Scheme reader.
 
Info Catalog (guile.info.gz) SRFI-9 (guile.info.gz) SRFI Support (guile.info.gz) SRFI-11
automatically generated byinfo2html