⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sprint.3

📁 牛顿插值方法求解多项式的系数
💻 3
字号:
.\"(c) Copyright 1992, 1993 by Panagiotis Tsirigotis.\"All rights reserved.  The file named COPYRIGHT specifies the terms .\"and conditions for redistribution..\".\" $Id: Sprint.3,v 1.1.1.1 2003/02/19 17:29:27 bbraun Exp $.TH Sprint 3X "29 May 1992".SH NAMESprint -- formatted stream output.SH SYNOPSIS.LP.nf.ft Bint Sprint( fd, format [ , ... ] )int fd ;char *format ;.SH DESCRIPTION\fBSprint()\fR provides formatted output conversion. The formatting iscontrolled by the \fIformat\fR argument. All characters in\fIformat\fR that do not specify a conversion are printed. A conversionis specified by a '%' followed by a string that ends with aconversion type character. The string may contain flags, a field width,a precision, and a modifier..LPPossible flags (more that one can be specified and they can be in any order)include:.TP 10.B \'-'specifies left adjustment of the converted argument. The defaultis right adjustment. This flag is meaningful only if a field widthis specified..TP.B \'+'specifies that a number will always have a sign as a prefix (thisforces a '+' sign to appear if the number is positive)..TP.B \' 'prefixes a \fIspace\fR to the number if the number has not a sign(therefore the '+' flag overrides this flag)..TP.B \'#'The meaning of '#' depends on the conversion type character: for \fBo\fR conversions the first digit will be 0; for \fBx\fR or \fBX\fR conversions\fB0x\fR or \fB0X\fR respectively will be prefixed to the number (if itis not zero); for \fBe\fR, \fBE\fR, \fBf\fR, \fBg\fR, and \fBG\fR conversionsthe number will always have a decimal point..TP.B \'0'specifies padding with zeros instead of spaces..LPThe field width is specified by a number. This number indicates the\fIminimum\fR width for the field. A '*' may be used instead of the number.In that case the width is the value of the next argument which shouldbe an \fBint\fR. A negative width value specifies left adjustment with a width equalto the absolute width value..LPA precision is specified by a '.' followed by a number. The meaning ofthe precision depends on the type conversion character. For a stringconversion, precision determines how many characters are printed fromthe string. For integer conversions, precision determines the number of digits used to print the number (zero padding is done ifthe precision exceeds the length of the number). For floating pointconversions, precision determines the number of digits after thedecimal point (\fBe\fR, \fBE\fR, \fBf\fR) or the number ofsignificant digits (\fBg\fR, \fBG\fR).A '*' may be used instead of a number to specify the precision. In thatcase the precision is the value of the next argument which shouldbe an \fBint\fR.The behavior of \fBSprint()\fR is undefined if the precision is negative..LPThe length modifier is \fBl\fR and indicates that the argument isa \fBlong\fR integer..LPThe type conversion characters are:\fBd, i, o, x, X, u, c, s, f, e, E, g, G, p, n, %\fR.For floating point conversions the argument should be of type \fIdouble\fR..TP 10.B d,ispecify signed decimal conversion..TP.B uspecifies unsigned decimal conversion..TP.B ospecifies octal conversion..TP.B x,Xspecify hexadecimal conversion. For .B xthe hex digits used are 0123456789abcdef. For.B Xthe hex digits used are 0123456789ABCDEF.There is no leading.B 0xor.B 0X(use the '#' flag for that)..TP.B cspecifies character conversion; the argument should be of type\fIchar\fR..TP.B sspecifies string conversion; the argument should be of type\fIchar *\fR..TP.B fspecifies conversion to the form [-]ddd.dddd. The numberof digits after the decimal point depends on precision; the default is 6.If the precision is 0, the decimal point is not printed (this canbe overriden with the '#' flag)..B e,Especify conversion to the form [-]ddd.dddd[eE][+-]ddd.The number of digits after the decimal point depends on precision;the default is 6. If the precision is 0, the decimal point is not printed(this can be overriden with the '#' flag).The exponent is at least 2 digit wide..TP.B g,Gspecify a conversion using the.B e,Eformat respectively if theexponent is less than -4 or greater than or equal to the precision;otherwise the .B fformat is used..TP.B pis used to print pointers (type \fIvoid *\fR,or \fIchar *\fR if the compiler does not support the former)..TP.B nexpects a \fIint *\fR argument and puts in that integer the number of characters already printed by this call..TP.B %is used to print a \fI%\fR..LPIf an unknown conversion character is specified, the percent signfollowed by that character will be printed..SH RETURN VALUE.LPIf no error occured, \fBSprint()\fR returns the number of charactersprinted. In case of error, it returns \fBSIO_ERR\fR..SH BUGS.LPThis is a list of differences between \fBSprint()\fR and the ANSI C Standard\fBprintf()\fR:.LP\fBSprint()\fR does not support non-removal of trailing zeroes for\fBg\fR and \fBG\fR conversions when the '#' flag is used..LP\fBSprint()\fR does not support the h and L modifiers..LPThe current implementation assumes that \fIsizeof(int)==sizeof(long)\fR..LP\fBSprint()\fR supports "%p" only if \fIsizeof(pointer)<=sizeof(int)\fR.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -