guile-devel
[Top][All Lists]
Advanced

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

doc make-record-type printer func


From: Kevin Ryde
Subject: doc make-record-type printer func
Date: Wed, 14 Feb 2007 08:39:07 +1100
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux)

Unless it's meant to be a secret :), I thought I'd show the printer
func argument of make-record-type in the manual,


 -- Scheme Procedure: make-record-type type-name field-names [printer]
     Create and return a new "record-type descriptor".

     TYPE-NAME is a string naming the type.  Currently it's only used
     in the printed representation of records, and in diagnostics.

     FIELD-NAMES is a list of symbols naming the fields of a record of
     the new type.  Duplicates are not allowed among these symbols.

          (make-record-type "employee" '(name age salary))

     The optional PRINTER argument is a function for printing a record
     of the new type.  It's called as `(PRINTER record port)' and
     should look at RECORD and write to PORT.




reply via email to

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