In the initial note I missed the name documentation comments, it dealt with in-line developer comments.
As for name documentation comments, the mechanism of scriptdoc have been working fine. As in other languages, in J explicit definitions documentation comments make sense in front of the definition. And for consistency this also applies to tacit name definitions. So the example in previous post will become: NB.*Mean v average. sum divided by count.... this reminds me of the first time ..... NB. example: Mean 1 2 3 4 5 ---> 3 Mean=: (+/ % #) Then when you need the documentation, you just press Ctrl+F1. It is possible to have a verb that will extract scriptdoc for a given name. But it does not make much sense outside of the context of the scriptdoc for the whole script. Regarding spaces and comments in tacit definitions, it is most readble if comments are either on the same line for short definitions, or if comments are above the definition, the definitions need to be separated with a blank line: NB.*Mean v arithmetic mean Mean=: + % # NB.*Stddev v standard deviation Stddev=: %:@(+/@:*:@(-"_1 _ Mean) % <:@#) --- Pascal Jasmin <[EMAIL PROTECTED]> wrote: > The way I dreamed it up... > > Mean=: (+/ % #) > NB. average. sum divided by count.... this reminds me of the first time > ..... > NB. example: Mean 1 2 3 4 5 ---> 3 > > and then when you typed Mean by itself in a J window, it would display the > comments along with > the definition, with the comments formatted below as typed. That's what I > meant by 'special > parsing' > > ----- Original Message ---- > From: "Miller, Raul D" <[EMAIL PROTECTED]> > To: General forum <[email protected]> > Sent: Saturday, October 28, 2006 9:31:26 PM > Subject: RE: [Jgeneral] Whitespace and Comments > > Pascal Jasmin wrote: > > > I often wished there was special parsing in J for a tabbed comment > > > below a tacit definition, so that the comment could be shown > > > (without scrolling sideways) when code is displayed. > > > > Perhaps like this? > > > > name=:1 :0 > > definition > > goes > > here > > ) > > Note'' > > comment > > goes > > here > > ) > > > > -- > > Raul ____________________________________________________________________________________ Access over 1 million songs - Yahoo! Music Unlimited (http://music.yahoo.com/unlimited) ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
