Connecting Tech Pros Worldwide Help | Site Map

setw, width

  #1  
Old July 19th, 2005, 07:48 PM
Marc Schellens
Guest
 
Posts: n/a
Is there an defined standard behaviour if I set in
an iostream the field width to zero or to an negative value?
(ie. using the natural with of the output object or similar)
thanks,
marc

  #2  
Old July 19th, 2005, 07:48 PM
Attila Feher
Guest
 
Posts: n/a

re: setw, width


Marc Schellens wrote:[color=blue]
> Is there an defined standard behaviour if I set in
> an iostream the field width to zero or to an negative value?
> (ie. using the natural with of the output object or similar)[/color]

Zero seems to be the "natural width" in the standard. About negative
values... only a comment says that negative values are only used (for the
type streamwidth) in one case, and that is not width (or precision). I did
not read every page (it is huge) but it seems that all the standard says is
that width sets the minimum width. IMHO this means that negative numbers
should behave the same as 0, but I might be wrong.

--
Attila aka WW


Closed Thread


Similar Threads
Thread Thread Starter Forum Replies Last Post
ios output width Ralf Goertz answers 6 December 9th, 2007 10:45 AM
Need manipulator to set maximum I/O width Johanus Dagius answers 4 June 27th, 2007 02:22 AM
help with setw and width functions! Jess answers 3 March 22nd, 2007 09:15 PM
width() and setw() Alex Vinokur answers 0 July 19th, 2005 08:58 PM