printf.1 (140368) | printf.1 (143906) |
---|---|
1.\" Copyright (c) 1989, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)printf.1 8.1 (Berkeley) 6/6/93 | 1.\" Copyright (c) 1989, 1990, 1993 2.\" The Regents of the University of California. All rights reserved. 3.\" 4.\" This code is derived from software contributed to Berkeley by 5.\" the Institute of Electrical and Electronics Engineers, Inc. 6.\" 7.\" Redistribution and use in source and binary forms, with or without 8.\" modification, are permitted provided that the following conditions --- 19 unchanged lines hidden (view full) --- 28.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 29.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 30.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 31.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 32.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 33.\" SUCH DAMAGE. 34.\" 35.\" @(#)printf.1 8.1 (Berkeley) 6/6/93 |
36.\" $FreeBSD: head/usr.bin/printf/printf.1 140368 2005-01-17 07:44:44Z ru $ | 36.\" $FreeBSD: head/usr.bin/printf/printf.1 143906 2005-03-21 08:01:09Z das $ |
37.\" 38.Dd July 3, 2004 39.Dt PRINTF 1 40.Os 41.Sh NAME 42.Nm printf 43.Nd formatted output 44.Sh SYNOPSIS --- 147 unchanged lines hidden (view full) --- 192formats, or the maximum number of characters to be printed 193from a string; if the digit string is missing, the precision is treated 194as zero; 195.It Format: 196A character which indicates the type of format to use (one of 197.Cm diouxXfFeEgGaAcsb ) . 198The uppercase formats differ from their lowercase counterparts only in 199that the output of the former is entirely in uppercase. | 37.\" 38.Dd July 3, 2004 39.Dt PRINTF 1 40.Os 41.Sh NAME 42.Nm printf 43.Nd formatted output 44.Sh SYNOPSIS --- 147 unchanged lines hidden (view full) --- 192formats, or the maximum number of characters to be printed 193from a string; if the digit string is missing, the precision is treated 194as zero; 195.It Format: 196A character which indicates the type of format to use (one of 197.Cm diouxXfFeEgGaAcsb ) . 198The uppercase formats differ from their lowercase counterparts only in 199that the output of the former is entirely in uppercase. |
200The floating-point format specifiers 201.Cm ( fFeEgGaA ) 202may be prefixed by an 203.Cm L 204to request that additional precision be used, if available. |
|
200.El 201.Pp 202A field width or precision may be 203.Sq Cm \&* 204instead of a digit string. 205In this case an 206.Ar argument 207supplies the field width or precision. --- 113 unchanged lines hidden (view full) --- 321It is modeled 322after the standard library function, 323.Xr printf 3 . 324.Sh BUGS 325Since the floating point numbers are translated from 326.Tn ASCII 327to floating-point and 328then back again, floating-point precision may be lost. | 205.El 206.Pp 207A field width or precision may be 208.Sq Cm \&* 209instead of a digit string. 210In this case an 211.Ar argument 212supplies the field width or precision. --- 113 unchanged lines hidden (view full) --- 326It is modeled 327after the standard library function, 328.Xr printf 3 . 329.Sh BUGS 330Since the floating point numbers are translated from 331.Tn ASCII 332to floating-point and 333then back again, floating-point precision may be lost. |
334(By default, the number is translated to an IEEE-754 double-precision 335value before being printed. 336The 337.Cm L 338modifier may produce additional precision, depending on the hardware platform.) |
|
329.Pp 330.Tn ANSI 331hexadecimal character constants were deliberately not provided. 332.Pp 333The escape sequence \e000 is the string terminator. 334When present in the 335.Ar format , 336the 337.Ar format 338will be truncated at the \e000 character. 339.Pp 340Multibyte characters are not recognized in format strings (this is only 341a problem if 342.Ql % 343can appear inside a multibyte character). | 339.Pp 340.Tn ANSI 341hexadecimal character constants were deliberately not provided. 342.Pp 343The escape sequence \e000 is the string terminator. 344When present in the 345.Ar format , 346the 347.Ar format 348will be truncated at the \e000 character. 349.Pp 350Multibyte characters are not recognized in format strings (this is only 351a problem if 352.Ql % 353can appear inside a multibyte character). |