guile-user
[Top][All Lists]
Advanced

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

Re: A documentation string in guile?


From: Rob Browning
Subject: Re: A documentation string in guile?
Date: Thu, 27 Sep 2001 13:01:21 -0500
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

½Å¼º±¹(9) <address@hidden> writes:

> But I don't know how to provide a documentation string when I define
> scheme procedures. I tried in the same way what I do when I use LISP,
> but I failed.

I just tested 1.3.4, 1.4, and the 1.5.4 beta, and this should work:

  (define (foo)
    "Your documentation here."
    #t)

Then you can access the documentation via (procedure-documentation
foo) among presumably other ways.

>From the latest info pages:

   Documentation for a procedure can be accessed with the procedure
`procedure-documentation'.

 - primitive: procedure-documentation proc
     Return the documentation string associated with `proc'.  By
     convention, if a procedure contains more than one expression and
     the first expression is a string constant, that string is assumed
     to contain documentation for that procedure.

Hope this helps.

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG=1C58 8B2C FB5E 3F64 EA5C  64AE 78FE E5FE F0CB A0AD



reply via email to

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