Re: Yapp (yet another pretty print)
I wrote:
> Hello Pete, you wrote:
<snip>
>> I've put a space after each comma, do you want an option to drop that?
>
> I personally like it the way it is. With a space after each comma,
> I can perceive especially big tables faster and more reliable than
> without. Maybe other people want an option to drop that. On the other
> hand, to keep it simple, IMHO there shouldn't be too many options.
<snip>
Another idea. I just got this output ...
{{1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 2, 4}, {1, 3, 4, 2}, {1, 4, 2, 3},
{1, 4, 3, 2}, {2, 1, 3, 4}, {2, 1, 4, 3}, {2, 3, 1, 4}, {2, 3, 4, 1},
{2, 4, 1, 3}, {2, 4, 3, 1}, {3, 1, 2, 4}, {3, 1, 4, 2}, {3, 2, 1, 4},
{3, 2, 4, 1}, {3, 4, 1, 2}, {3, 4, 2, 1}, {4, 1, 2, 3}, {4, 1, 3, 2},
{4, 2, 1, 3}, {4, 2, 3, 1}, {4, 3, 1, 2}, {4, 3, 2, 1}}
... which is not so clear for me after all. Without a space after each
comma, it would be:
{{1,2,3,4},{1,2,4,3},{1,3,2,4},{1,3,4,2},{1,4,2,3},
{1,4,3,2},{2,1,3,4},{2,1,4,3},{2,3,1,4},{2,3,4,1},
{2,4,1,3},{2,4,3,1},{3,1,2,4},{3,1,4,2},{3,2,1,4},
{3,2,4,1},{3,4,1,2},{3,4,2,1},{4,1,2,3},{4,1,3,2},
{4,2,1,3},{4,2,3,1},{4,3,1,2},{4,3,2,1}}
Also not too clear, IMHO.
How about putting a space after each comma, except in the innermost level
of a sequence?
That would give:
{{1,2,3,4}, {1,2,4,3}, {1,3,2,4}, {1,3,4,2}, {1,4,2,3},
{1,4,3,2}, {2,1,3,4}, {2,1,4,3}, {2,3,1,4}, {2,3,4,1},
{2,4,1,3}, {2,4,3,1}, {3,1,2,4}, {3,1,4,2}, {3,2,1,4},
{3,2,4,1}, {3,4,1,2}, {3,4,2,1}, {4,1,2,3}, {4,1,3,2},
{4,2,1,3}, {4,2,3,1}, {4,3,1,2}, {4,3,2,1}}
Best regards,
Juergen
--
/"\ ASCII ribbon campain | "Everything should be made as simple
\ / against HTML in | as possible, but not simpler."
X e-mail and news, |
/ \ and unneeded MIME | http://www.sfheart.com/einstein.html
|
Not Categorized, Please Help
|
|