From: JP Massar
Subject: What exactly is allowed wrt declarations and doc string syntax?
Date: 
Message-ID: <3e062bcb.226006595@netnews.attbi.com>
3.4.11 Syntactic Interaction of Documentation Strings and Declarations

In a number of situations, a documentation string can appear amidst a
series of declare expressions prior to a series of forms.

----

This seems to suggest to me that

<doc> <body>

<dcl1> <dcl2> ... <body>

<doc> <dcl1> <dcl2> ... <body>

<dcl1> <dcl2> ... <doc> <body>

<dcl1> <dcl2> ... <doc> <dcl3> <dcl4> ... <body>

Are all valid.  (OK, in the 3rd one the doc is not 'amidst'
the decls, but it makes no sense to disallow the 3rd and
allow the 5th, and the 5th is clearly allowed.)


OTOH, if we look at, say DEFUN we see

 defun function-name lambda-list [[declaration* | documentation]]
form*


which might be interpreted as insisting that all declarations
appear before the doc string.

From: Harald Hanche-Olsen
Subject: Re: What exactly is allowed wrt declarations and doc string syntax?
Date: 
Message-ID: <pcosmwpvhri.fsf@thoth.math.ntnu.no>
+ ······@alum.mit.edu (JP Massar):

| OTOH, if we look at, say DEFUN we see
| 
|  defun function-name lambda-list [[declaration* | documentation]]
| form*
| 
| which might be interpreted as insisting that all declarations
| appear before the doc string.

It might, unless you have read section 1.4.1.2.1.

-- 
* Harald Hanche-Olsen     <URL:http://www.math.ntnu.no/~hanche/>
- Yes it works in practice - but does it work in theory?
From: JP Massar
Subject: Re: What exactly is allowed wrt declarations and doc string syntax?
Date: 
Message-ID: <3e065831.237374286@netnews.attbi.com>
On 22 Dec 2002 22:57:37 +0100, Harald Hanche-Olsen
<······@math.ntnu.no> wrote:

>+ ······@alum.mit.edu (JP Massar):
>
>| OTOH, if we look at, say DEFUN we see
>| 
>|  defun function-name lambda-list [[declaration* | documentation]]
>| form*
>| 
>| which might be interpreted as insisting that all declarations
>| appear before the doc string.
>
>It might, unless you have read section 1.4.1.2.1.
>
 
Ah, indeed.  Thanks!