[m-dev.] Contribution: Pretty Printing Library
Mark Anthony BROWN
dougl at cs.mu.OZ.AU
Fri Apr 14 00:18:11 AEST 2000
Ralph Becket writes:
>
>
> > - Tab size.
>
> Hmm. I've recently (following discussion on this list) adopted the
> convention of using four space tabs for code layout. Since Mercury's
> syntax does tend to lead to long lines of text, this often means one
> can avoid having to break a goal over more than one line.
>
> I can redo it all using standard eight space tabs, but is it really
> necessary? The guidelines do say that ``highly intended code which
> may be indented at 4 spaces per level of indentation.''
>
Well, the interface is not highly indented---it doesn't go beyond
one level---and it is the interface I am mainly concerned about,
since the manual is generated from it. It's not necessary to redo
the whole thing, but I'd prefer you to change the indentation
in the interface to 8 spaces.
> > - The dividing lines (mostly) are quite a bit shorter in
> > the library modules.
>
> I've just had a quick look through some of the library modules and
> a 79 column dividing line seems to be the norm (mine are 80). Is
> this a problem?
Sorry, you are right. I looked through the _generated_ html and noticed
that they were consistently shorter. But it turns out that in processing
the texi (the code is in doc/Mmakefile), lines matching '^%----*----% *$'
are replaced with a fixed dividing line---they aren't shorter in the
source code. So you needn't worry about the length so much. You
will need to remove the spaces between the %'s and -'s, though, so it
matches the pattern.
>
> > - Anything else you notice from the coding standards document.
>
> I use `if then else' rather than `-> ;' and `not' rather than `\+',
> but I take it this is okay?
>
That's fine by me.
Cheers,
Mark.
--
Mark Brown, PhD student )O+ | "Another of Fortran's breakthroughs
(m.brown at cs.mu.oz.au) | was the GOTO statement, which was...
Dept. of Computer Science and Software | uniquely simple and understandable"
Engineering, University of Melbourne | -- IEEE, 1994
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list