[racket] multi-line strings in ISL?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Sun Feb 17 20:14:44 EST 2013

I don't know if it is appropriate in your setting, but you could use the
racket/pretty library (where you can specify a column width and it will
make an attempt to use that width).

Or, if these are values printing in DrRacket, then you can change the width
of the window before they are returned in the REPL and that will control
how wide they are printed. It may help to use the horizontal mode (the
"View" menu's "Use Horizontal Layout" menu item).

Robby


On Sun, Feb 17, 2013 at 4:43 PM, Mitchell Wand <wand at ccs.neu.edu> wrote:

> Is there a good way to create multi-line strings in ISL?  For example,
> instead of producing output in the form
>
> (list
>  "(* 11
>         "
>  "   22
>         "
>  "   33
>         "
>  "   44
>         "
>  "   55)
>        ")
>
> [where here I've padded the strings out to 80 characters to force the
> Racket printer to produce each string on a separate line.]
>
> I'd like to have a program that produced the output
>
> (* 11
>    22
>    33
>    44
>    55)
>
> preferably without quotations.  When I put things like #\n #\newline or
> #\r in the middle of a string, ISL prints them out like #\n, #\newline, or
> #\r.
>
> Any ideas?  What have I overlooked?
>
> --Mitch
>
>
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20130217/e7c7e7bd/attachment-0001.html>

Posted on the users mailing list.