MathGroup Archive 2014

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Controlling breaking of lines in output of Write

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132553] Re: Controlling breaking of lines in output of Write
  • From: "Hans Michel" <hmichel at cox.net>
  • Date: Fri, 11 Apr 2014 02:09:29 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net
  • References: <o7Fv1n00Y1r5Uyi017FwTD>

Derivator

Straight from the Help Files

file1 = $TemporaryPrefix <> "test1";

stream = OpenWrite[file1, PageWidth -> 60];
Write[stream, Expand[(x + y)^5]];
Close[stream];

You are looking for the PageWidth option in the OpenWrite function when
initializing the stream.

PageWidth -> Infinity no linebreaking

I believe the default is PageWidth -> 80 (0--79)

If you output a newline character into your stream then you control where
the lines are broken.

Hans

-----Original Message-----
From: derivator [mailto:derivatorb at gmail.com] 
Sent: Thursday, April 10, 2014 2:10 AM
To: mathgroup at smc.vnet.net
Subject: [mg132553] Controlling breaking of lines in output of Write

Dear all,

When I use Write["file", expression], I find that if the expression is
sufficiently long the output in "file" is broken into two or more lines.
Usually this happens for expressions longer than 79 characters.
Is it possible to change 79 to some other value, or control how the lines
are broken in the output?

Thanks in advance

Derivator





  • Prev by Date: Re: Help!
  • Next by Date: Re: Do we need a When function?
  • Previous by thread: Controlling breaking of lines in output of Write
  • Next by thread: Re: Do we need a When function?