MathGroup Archive 2003

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

Search the Archive

Re: Formatted output

  • To: mathgroup at smc.vnet.net
  • Subject: [mg39289] Re: Formatted output
  • From: Steve Gray <stevebg at adelphia.net>
  • Date: Sun, 9 Feb 2003 04:51:00 -0500 (EST)
  • References: <b1q704$34m$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

On Wed, 5 Feb 2003 05:21:08 +0000 (UTC), Steve Gray
<stevebg at adelphia.net> wrote:

>Hello all,
>
>	I want to produce a table of text output (in the same notebook
>my code is in). The output consists of many rows of numbers, each row
>containing the same number of numbers. For example the entire output
>might consist of 500 rows each having 7 columns. It is important for
>understanding the output to have well-formatted columns of a constant
>width regardless of the number of digits in each number (which will be
>no more than say 9). In the columns the numbers should be
>right-aligned.
>	"Print" does not seem to have enough control to do this. It's
>much less flexible than the print statement in C. What I need is
>something like that. I've been reading the book, sections 2.7, 2.8,
>etc., and it looks like I will have to write an actual (small) program
>to do this. 

Gray:
	It's interesting that almost everyone who responded had a
somewhat  different answer. My own answer, which I found after
browsing in the Big Book and fooling around for a while, was to use
PaddedForm, which no one mentioned and which does most of what I need.
	I thank everyone who took time to respond. This group is a
very valuable resource.



  • Prev by Date: Re: Log[Exp[r]] <> r?
  • Next by Date: Re: triangles
  • Previous by thread: Re: Formatted output
  • Next by thread: Interpolation over an irregular surface