Rijk-Jan van [EMAIL PROTECTED] writes:
> 
> Recently, Craig Delehanty discovered that there is
> a difference in behaviour of putStr "a\tb" between
> Hugs and WinHugs (see comp.lang.functional).
> 
> Hugs interprets it as a alignment character:
 > >putStr "a\tb"
> "a       b"
 > >
> (7 spaces)
> but in WinHugs, it is always the same as 8 spaces:
 > >putStr "a\tb"
>  "a        b"
 > >
> (8 spaces)
> 
> What does the language definition say about this?

Nothing at all, I believe, but the convention is for tab characters
to be interpreted by an output device as moving the cursor to
the next tab stop/alignment column. In the absence of any custom
set of tab stops, the convention is to space them evenly every
8 characters.

So, WinHugs is being unnecessarily non-standard to interpret
"\t" as being a shorthand for 8 spaces. I've changed this to have
it fall into line with the conventional interpretation & checked
in the tweak. Thanks for reporting this.

--sigbjorn



_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

_______________________________________________
Hugs-Bugs mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/hugs-bugs

Reply via email to