[m-dev.] For review: added string__words/2

Robert Ernst Johann JESCHOFNIK rejj at students.cs.mu.oz.au
Fri Apr 14 10:15:58 AEST 2000


On Fri, 14 Apr 2000, Fergus Henderson wrote:

> > +    ( if WordEnd < 0 then
> > +        Words = Words0
> > +      else
> 
> Normally we indent the `;' for an if-then-else at the same level as the
> `('.  The Mercury coding guidelines don't explicitly discuss layout
> for the `(if ... then ... else ...)' form, but IMHO it should match the
> layout for the `(... -> ... ; ...)' form.  (Any other opinions on this?)

I think it may be better to have the `if', `then', and `else' keywords all
with matching indentation. ie,
	( if
		halts(TuringMachine0)
	  then
		Halts = yes
	  else
		Halts = no
	),

instead of
	(
		halts(TuringMachine0)
	->
		Halts = yes
	;
		Halts = no
	),

But then, I just use the ( .. -> .. ; .. ) form all the time, anyway.



Rob

--------------------------------------------------------------------------
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