On 6/24/07, Brian Schott <[EMAIL PROTECTED]> wrote:
For my immediate usage, equal columns is fine. I
guess I could use more control if I were trying to squeeze
more on a single page, though. I guess one could call list2,
"telephone book" or "unix ls" style listing.
Ok... filling the result out so it's as close as possible
to your specified max width after compressing out redundant
(column) spaces gets complicated -- and it sounds as if this
is not particularly important to you.
+ (Note also that, personally, I think 'list' does too much.
+ I'd be much more inclined to use a pair of words -- one
+ that boxed my string appropriately (or formed it into a
+ matrix, if constant width columns are acceptable) and
+ another which reforms that into columns.)
I am a little confused by the first "word" of your
Note because boxing does not necessarily produce a rank 2
result. Instead of "boxed my string appropriately" do you
mean more than boxing would be accomplished by the first
word? Or do you mean that the second word would be
unnecessary if constant width columns were acceptable?
Unboxing a rank one boxed list gets you a rank 2 result.
These two forms represent the same data, but the unboxed
form has constant width columns while the boxed form does
not.
In any case, are you thinking in terms of two words
-- two levels of processing -- because you think each could
be done without looping, or because you think the two parts
could be applied independently with other processes, or
what?
Because the operations have little to do with each other. For
example, my text might already be split up into boxes, or
maybe I'm using some other delimiter, or maybe want
to replace blanks with some fill sequence between the two
steps, or ...
--
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm