home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
You can browse this item here: sprintf.tex
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text, with CR line terminators
| default
| |
100%
| checkBytes
| Printable ASCII
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[CR]
| default (weak)
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [ttxt] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 73 65 63 74 69 6f 6e | 7b 73 70 72 69 6e 74 66 |\section|{sprintf|
|00000010| 20 2d 2d 2d 20 43 72 65 | 61 74 65 20 66 6f 72 6d | --- Cre|ate form|
|00000020| 61 74 74 65 64 20 73 74 | 72 69 6e 67 7d 0d 5c 6c |atted st|ring}.\l|
|00000030| 61 62 65 6c 7b 66 6e 3a | 73 70 72 69 6e 74 66 7d |abel{fn:|sprintf}|
|00000040| 0d 5c 69 6e 64 65 78 7b | 73 70 72 69 6e 74 66 28 |.\index{|sprintf(|
|00000050| 29 7d 0d 5c 69 6e 64 65 | 78 7b 63 72 65 61 74 65 |)}.\inde|x{create|
|00000060| 20 66 6f 72 6d 61 74 74 | 65 64 20 73 74 72 69 6e | formatt|ed strin|
|00000070| 67 7d 0d 5c 62 65 67 69 | 6e 7b 72 61 69 6c 7d 0d |g}.\begi|n{rail}.|
|00000080| 46 6f 72 6d 61 74 74 65 | 64 53 74 72 69 6e 67 20 |Formatte|dString |
|00000090| 3a 20 27 73 70 72 69 6e | 74 66 27 20 27 28 27 20 |: 'sprin|tf' '(' |
|000000a0| 53 74 72 69 6e 67 20 27 | 2c 27 20 53 74 72 69 6e |String '|,' Strin|
|000000b0| 67 20 28 20 28 20 27 2c | 27 20 56 61 72 69 61 62 |g ( ( ',|' Variab|
|000000c0| 6c 65 20 29 20 2a 20 29 | 20 27 29 27 20 3b 0d 5c |le ) * )| ')' ;.\|
|000000d0| 65 6e 64 7b 72 61 69 6c | 7d 0d 0d 0d 54 68 65 20 |end{rail|}...The |
|000000e0| 5c 52 4c 61 42 5c 20 5c | 76 65 72 62 2b 73 70 72 |\RLaB\ \|verb+spr|
|000000f0| 69 6e 74 66 2b 20 66 75 | 6e 63 74 69 6f 6e 20 61 |intf+ fu|nction a|
|00000100| 6c 6c 6f 77 73 20 61 20 | 66 6f 72 6d 61 74 74 65 |llows a |formatte|
|00000110| 64 20 73 74 72 69 6e 67 | 20 74 6f 20 62 65 0d 63 |d string| to be.c|
|00000120| 6f 70 69 65 64 20 74 6f | 20 61 20 76 61 72 69 61 |opied to| a varia|
|00000130| 62 6c 65 2e 20 49 74 20 | 69 73 20 73 69 6d 69 6c |ble. It |is simil|
|00000140| 61 72 20 74 6f 20 74 68 | 65 20 43 20 6c 61 6e 67 |ar to th|e C lang|
|00000150| 75 61 67 65 20 66 75 6e | 63 74 69 6f 6e 20 6f 66 |uage fun|ction of|
|00000160| 20 74 68 65 0d 73 61 6d | 65 20 6e 61 6d 65 2c 20 | the.sam|e name, |
|00000170| 74 68 6f 75 67 68 20 73 | 6f 6d 65 20 66 65 61 74 |though s|ome feat|
|00000180| 75 72 65 73 20 61 72 65 | 20 6c 69 6d 69 74 65 64 |ures are| limited|
|00000190| 20 6f 72 20 6e 6f 74 20 | 61 76 61 69 6c 61 62 6c | or not |availabl|
|000001a0| 65 2c 20 73 69 6e 63 65 | 0d 5c 52 4c 61 42 5c 20 |e, since|.\RLaB\ |
|000001b0| 64 6f 65 73 6e 27 74 20 | 68 61 76 65 20 61 6c 6c |doesn't |have all|
|000001c0| 20 74 68 65 20 64 61 74 | 61 20 74 79 70 65 73 20 | the dat|a types |
|000001d0| 6f 66 20 43 2e 0d 0d 54 | 68 65 20 66 69 72 73 74 |of C...T|he first|
|000001e0| 20 61 72 67 75 6d 65 6e | 74 20 69 73 20 74 68 65 | argumen|t is the|
|000001f0| 20 6e 61 6d 65 20 6f 66 | 20 74 68 65 20 74 61 72 | name of| the tar|
|00000200| 67 65 74 20 73 74 72 69 | 6e 67 2e 20 20 49 66 20 |get stri|ng. If |
|00000210| 69 74 20 69 73 20 61 6c | 72 65 61 64 79 0d 61 20 |it is al|ready.a |
|00000220| 73 74 72 69 6e 67 2c 20 | 74 68 65 20 6f 6c 64 20 |string, |the old |
|00000230| 63 6f 6e 74 65 6e 74 73 | 20 61 72 65 20 64 65 6c |contents| are del|
|00000240| 65 74 65 64 2e 20 20 49 | 66 20 69 74 20 69 73 20 |eted. I|f it is |
|00000250| 6e 6f 74 20 61 6c 72 65 | 61 64 79 20 61 0d 73 74 |not alre|ady a.st|
|00000260| 72 69 6e 67 2c 20 74 68 | 65 6e 20 69 74 20 69 73 |ring, th|en it is|
|00000270| 20 64 65 6c 65 74 65 64 | 2c 20 61 6e 64 20 61 20 | deleted|, and a |
|00000280| 6e 65 77 20 73 74 72 69 | 6e 67 20 69 73 20 63 72 |new stri|ng is cr|
|00000290| 65 61 74 65 64 2e 20 20 | 49 66 20 69 74 0d 64 6f |eated. |If it.do|
|000002a0| 65 73 6e 27 74 20 65 78 | 69 73 74 2c 20 69 74 20 |esn't ex|ist, it |
|000002b0| 69 73 20 63 72 65 61 74 | 65 64 2e 0d 0d 54 68 65 |is creat|ed...The|
|000002c0| 20 73 65 63 6f 6e 64 20 | 73 74 72 69 6e 67 20 61 | second |string a|
|000002d0| 72 67 75 6d 65 6e 74 20 | 69 73 20 74 68 65 20 66 |rgument |is the f|
|000002e0| 6f 72 6d 61 74 20 73 74 | 72 69 6e 67 2e 20 20 49 |ormat st|ring. I|
|000002f0| 74 20 63 6f 6e 73 69 73 | 74 73 20 6f 66 20 74 68 |t consis|ts of th|
|00000300| 65 0d 74 65 78 74 20 74 | 6f 20 62 65 20 77 72 69 |e.text t|o be wri|
|00000310| 74 74 65 6e 20 6f 75 74 | 2c 20 61 6e 64 20 70 6f |tten out|, and po|
|00000320| 73 73 69 62 6c 79 20 73 | 6f 6d 65 20 63 6f 6e 76 |ssibly s|ome conv|
|00000330| 65 72 73 69 6f 6e 20 73 | 70 65 63 69 66 69 63 61 |ersion s|pecifica|
|00000340| 74 69 6f 6e 73 2e 0d 41 | 20 63 6f 6e 76 65 72 73 |tions..A| convers|
|00000350| 69 6f 6e 20 73 70 65 63 | 69 66 69 63 61 74 69 6f |ion spec|ificatio|
|00000360| 6e 20 69 73 20 61 20 73 | 65 71 75 65 6e 63 65 20 |n is a s|equence |
|00000370| 6f 66 20 63 6f 6d 6d 61 | 6e 64 73 20 74 68 61 74 |of comma|nds that|
|00000380| 20 64 65 74 65 72 6d 69 | 6e 65 0d 68 6f 77 20 74 | determi|ne.how t|
|00000390| 68 65 20 72 65 6d 61 69 | 6e 64 65 72 20 6f 66 20 |he remai|nder of |
|000003a0| 74 68 65 20 61 72 67 75 | 6d 65 6e 74 73 20 61 72 |the argu|ments ar|
|000003b0| 65 20 74 6f 20 62 65 20 | 64 69 73 70 6c 61 79 65 |e to be |displaye|
|000003c0| 64 2e 20 20 54 68 65 20 | 6c 65 66 74 20 6d 6f 73 |d. The |left mos|
|000003d0| 74 0d 63 6f 6e 76 65 72 | 73 69 6f 6e 20 73 70 65 |t.conver|sion spe|
|000003e0| 63 69 66 69 65 72 20 69 | 73 20 6d 61 74 63 68 65 |cifier i|s matche|
|000003f0| 64 20 74 6f 20 74 68 65 | 20 74 68 69 72 64 20 61 |d to the| third a|
|00000400| 72 67 75 6d 65 6e 74 2c | 20 74 68 65 20 6e 65 78 |rgument,| the nex|
|00000410| 74 0d 73 70 65 63 69 66 | 69 65 72 20 74 6f 20 74 |t.specif|ier to t|
|00000420| 68 65 20 66 6f 75 72 74 | 68 20 61 72 67 75 6d 65 |he fourt|h argume|
|00000430| 6e 74 2c 20 61 6e 64 20 | 73 6f 20 6f 6e 2e 20 20 |nt, and |so on. |
|00000440| 45 61 63 68 20 61 72 67 | 75 6d 65 6e 74 20 68 61 |Each arg|ument ha|
|00000450| 73 20 74 6f 20 62 65 0d | 6d 61 74 63 68 65 64 20 |s to be.|matched |
|00000460| 74 6f 20 61 20 63 6f 6e | 76 65 72 73 69 6f 6e 20 |to a con|version |
|00000470| 73 70 65 63 69 66 69 63 | 61 74 69 6f 6e 2e 20 20 |specific|ation. |
|00000480| 57 68 65 6e 20 74 68 65 | 20 66 6f 72 6d 61 74 20 |When the| format |
|00000490| 73 74 72 69 6e 67 20 69 | 73 0d 62 65 69 6e 67 20 |string i|s.being |
|000004a0| 73 63 61 6e 6e 65 64 2c | 20 74 68 65 20 61 72 67 |scanned,| the arg|
|000004b0| 75 6d 65 6e 74 20 74 68 | 61 74 20 6d 61 74 63 68 |ument th|at match|
|000004c0| 65 73 20 74 68 65 20 74 | 68 65 20 73 70 65 63 69 |es the t|he speci|
|000004d0| 66 69 65 72 20 74 68 61 | 74 20 74 68 65 0d 73 63 |fier tha|t the.sc|
|000004e0| 61 6e 6e 65 72 20 69 73 | 20 75 70 20 74 6f 20 69 |anner is| up to i|
|000004f0| 73 20 63 61 6c 6c 65 64 | 20 74 68 65 20 7b 20 5c |s called| the { \|
|00000500| 65 6d 20 63 75 72 72 65 | 6e 74 20 61 72 67 75 6d |em curre|nt argum|
|00000510| 65 6e 74 20 7d 2e 0d 0d | 43 6f 6e 76 65 72 73 69 |ent }...|Conversi|
|00000520| 6f 6e 20 73 70 65 63 69 | 66 69 63 61 74 69 6f 6e |on speci|fication|
|00000530| 73 20 61 6c 77 61 79 73 | 20 62 65 67 69 6e 20 77 |s always| begin w|
|00000540| 69 74 68 20 61 20 5c 76 | 65 72 62 2b 25 2b 20 73 |ith a \v|erb+%+ s|
|00000550| 69 67 6e 2e 20 20 54 68 | 65 20 6e 65 78 74 0d 74 |ign. Th|e next.t|
|00000560| 68 69 6e 67 20 74 68 61 | 74 20 63 61 6e 20 6f 63 |hing tha|t can oc|
|00000570| 63 75 72 20 61 72 65 20 | 74 68 65 20 66 6c 61 67 |cur are |the flag|
|00000580| 73 3a 0d 5c 62 65 67 69 | 6e 7b 64 65 73 63 72 69 |s:.\begi|n{descri|
|00000590| 70 74 69 6f 6e 7d 0d 5c | 69 74 65 6d 5b 2d 5d 20 |ption}.\|item[-] |
|000005a0| 63 61 75 73 69 6e 67 20 | 74 68 65 20 63 6f 6e 76 |causing |the conv|
|000005b0| 65 72 73 69 6f 6e 20 74 | 6f 20 62 65 20 6c 65 66 |ersion t|o be lef|
|000005c0| 74 2d 6a 75 73 74 69 66 | 69 65 64 2c 20 69 6e 73 |t-justif|ied, ins|
|000005d0| 74 65 61 64 0d 6f 66 20 | 74 68 65 20 64 65 66 61 |tead.of |the defa|
|000005e0| 75 6c 74 20 72 69 67 68 | 74 2d 6a 75 73 74 69 66 |ult righ|t-justif|
|000005f0| 69 65 64 2e 0d 5c 69 74 | 65 6d 5b 2b 5d 20 63 61 |ied..\it|em[+] ca|
|00000600| 75 73 69 6e 67 20 61 20 | 73 69 67 6e 20 74 6f 20 |using a |sign to |
|00000610| 61 6c 77 61 79 73 20 62 | 65 20 70 72 65 70 65 6e |always b|e prepen|
|00000620| 64 65 64 20 74 6f 20 74 | 68 65 0d 63 6f 6e 76 65 |ded to t|he.conve|
|00000630| 72 73 69 6f 6e 2c 20 69 | 6e 73 74 65 61 64 20 6f |rsion, i|nstead o|
|00000640| 66 20 74 68 65 20 64 65 | 66 61 75 6c 74 20 6f 66 |f the de|fault of|
|00000650| 20 6f 6e 6c 79 20 70 72 | 65 70 65 6e 64 69 6e 67 | only pr|epending|
|00000660| 20 6d 69 6e 75 73 20 73 | 69 67 6e 73 2e 0d 5c 69 | minus s|igns..\i|
|00000670| 74 65 6d 5b 5c 23 5d 20 | 77 68 69 63 68 20 63 61 |tem[\#] |which ca|
|00000680| 75 73 65 73 20 74 68 65 | 20 66 6f 72 6d 61 74 20 |uses the| format |
|00000690| 74 6f 20 62 65 20 6f 66 | 20 61 6e 20 61 6c 74 65 |to be of| an alte|
|000006a0| 72 6e 61 74 65 20 66 6f | 72 6d 2e 0d 54 68 69 73 |rnate fo|rm..This|
|000006b0| 20 6f 6e 6c 79 20 68 61 | 73 20 6d 65 61 6e 69 6e | only ha|s meanin|
|000006c0| 67 20 66 6f 72 20 5c 76 | 65 72 62 2b 65 2b 2c 20 |g for \v|erb+e+, |
|000006d0| 5c 76 65 72 62 2b 45 2b | 2c 20 5c 76 65 72 62 2b |\verb+E+|, \verb+|
|000006e0| 66 2b 2c 20 5c 76 65 72 | 62 2b 67 2b 20 61 6e 64 |f+, \ver|b+g+ and|
|000006f0| 0d 5c 76 65 72 62 2b 47 | 2b 20 66 6f 72 6d 61 74 |.\verb+G|+ format|
|00000700| 73 2c 20 77 68 65 72 65 | 20 69 73 20 63 61 75 73 |s, where| is caus|
|00000710| 65 73 20 61 20 64 65 63 | 69 6d 61 6c 20 70 6f 69 |es a dec|imal poi|
|00000720| 6e 74 20 74 6f 20 62 65 | 20 75 73 65 64 20 61 6c |nt to be| used al|
|00000730| 77 61 79 73 2e 0d 49 74 | 20 61 6c 73 6f 20 70 72 |ways..It| also pr|
|00000740| 65 76 65 6e 74 73 20 73 | 75 70 70 72 65 73 73 69 |events s|uppressi|
|00000750| 6f 6e 20 6f 66 20 74 72 | 61 69 6c 69 6e 67 20 7a |on of tr|ailing z|
|00000760| 65 72 6f 73 20 66 6f 72 | 20 5c 76 65 72 62 2b 67 |eros for| \verb+g|
|00000770| 2b 20 61 6e 64 0d 5c 76 | 65 72 62 2b 47 2b 20 6f |+ and.\v|erb+G+ o|
|00000780| 70 74 69 6f 6e 73 2e 0d | 5c 69 74 65 6d 5b 30 20 |ptions..|\item[0 |
|00000790| 28 7a 65 72 6f 29 5d 20 | 77 68 69 63 68 20 63 61 |(zero)] |which ca|
|000007a0| 75 73 65 73 20 70 61 64 | 64 69 6e 67 20 62 79 20 |uses pad|ding by |
|000007b0| 6c 65 61 64 69 6e 67 20 | 7a 65 72 6f 73 2c 20 69 |leading |zeros, i|
|000007c0| 6e 73 74 65 61 64 0d 6f | 66 20 74 68 65 20 64 65 |nstead.o|f the de|
|000007d0| 66 61 75 6c 74 20 73 70 | 61 63 65 20 70 61 64 64 |fault sp|ace padd|
|000007e0| 69 6e 67 2e 20 20 54 68 | 69 73 20 69 73 20 6f 76 |ing. Th|is is ov|
|000007f0| 65 72 72 69 64 64 65 6e | 20 62 79 20 62 6f 74 68 |erridden| by both|
|00000800| 20 5c 76 65 72 62 2b 2d | 2b 20 61 6e 64 0d 73 70 | \verb+-|+ and.sp|
|00000810| 65 63 69 66 79 69 6e 67 | 20 61 20 70 72 65 63 69 |ecifying| a preci|
|00000820| 73 69 6f 6e 2e 0d 5c 69 | 74 65 6d 5b 7b 5c 69 74 |sion..\i|tem[{\it|
|00000830| 20 73 70 61 63 65 7d 5d | 20 77 68 69 63 68 20 63 | space}]| which c|
|00000840| 61 75 73 65 73 20 61 20 | 73 70 61 63 65 20 74 6f |auses a |space to|
|00000850| 20 62 65 20 70 72 65 70 | 65 6e 64 65 64 20 69 66 | be prep|ended if|
|00000860| 20 6e 6f 20 73 69 67 6e | 20 69 73 0d 70 72 65 73 | no sign| is.pres|
|00000870| 65 6e 74 2e 20 20 54 68 | 69 73 20 69 73 20 6f 76 |ent. Th|is is ov|
|00000880| 65 72 72 69 64 64 65 6e | 20 62 79 20 74 68 65 20 |erridden| by the |
|00000890| 5c 76 65 72 62 7c 2b 7c | 20 66 6c 61 67 2e 0d 5c |\verb|+|| flag..\|
|000008a0| 65 6e 64 7b 64 65 73 63 | 72 69 70 74 69 6f 6e 7d |end{desc|ription}|
|000008b0| 0d 0d 46 6f 6c 6c 6f 77 | 69 6e 67 20 61 6e 79 20 |..Follow|ing any |
|000008c0| 66 6c 61 67 73 2c 20 61 | 20 6d 69 6e 69 6d 75 6d |flags, a| minimum|
|000008d0| 20 66 69 65 6c 64 20 77 | 69 64 74 68 20 6d 61 79 | field w|idth may|
|000008e0| 20 62 65 20 73 70 65 63 | 69 66 69 65 64 2e 20 20 | be spec|ified. |
|000008f0| 54 68 69 73 20 69 73 0d | 65 69 74 68 65 72 20 61 |This is.|either a|
|00000900| 20 69 6e 74 65 67 65 72 | 20 63 6f 6e 73 74 61 6e | integer| constan|
|00000910| 74 2c 20 6f 72 20 61 20 | 5c 76 65 72 62 2b 2a 2b |t, or a |\verb+*+|
|00000920| 20 63 68 61 72 61 63 74 | 65 72 2e 20 49 66 20 69 | charact|er. If i|
|00000930| 74 20 69 73 20 61 0d 63 | 6f 6e 73 74 61 6e 74 2c |t is a.c|onstant,|
|00000940| 20 74 68 69 73 20 69 73 | 20 74 68 65 20 6d 69 6e | this is| the min|
|00000950| 69 6d 75 6d 20 77 69 64 | 74 68 2e 20 20 49 66 20 |imum wid|th. If |
|00000960| 69 74 20 69 73 20 61 20 | 5c 76 65 72 62 2b 2a 2b |it is a |\verb+*+|
|00000970| 2c 20 74 68 65 6e 20 74 | 68 65 0d 63 75 72 72 65 |, then t|he.curre|
|00000980| 6e 74 20 61 72 67 75 6d | 65 6e 74 20 28 77 68 69 |nt argum|ent (whi|
|00000990| 63 68 20 6d 75 73 74 20 | 62 65 20 61 20 73 63 61 |ch must |be a sca|
|000009a0| 6c 61 72 29 20 69 73 20 | 75 73 65 64 20 74 6f 20 |lar) is |used to |
|000009b0| 73 70 65 63 69 66 79 20 | 74 68 65 0d 6d 69 6e 69 |specify |the.mini|
|000009c0| 6d 75 6d 20 77 69 64 74 | 68 2e 20 20 49 66 20 74 |mum widt|h. If t|
|000009d0| 68 65 72 65 20 69 73 20 | 61 6e 20 6f 70 74 69 6f |here is |an optio|
|000009e0| 6e 61 6c 20 77 69 64 74 | 68 2c 20 74 68 65 6e 20 |nal widt|h, then |
|000009f0| 74 68 65 72 65 20 6d 61 | 79 20 61 6c 73 6f 20 62 |there ma|y also b|
|00000a00| 65 0d 61 6e 20 6f 70 74 | 69 6f 6e 20 70 72 65 63 |e.an opt|ion prec|
|00000a10| 69 73 69 6f 6e 2e 20 20 | 54 68 69 73 20 69 73 20 |ision. |This is |
|00000a20| 73 70 65 63 69 66 69 65 | 64 20 69 6e 20 74 68 65 |specifie|d in the|
|00000a30| 20 73 61 6d 65 20 77 61 | 79 20 61 73 20 74 68 65 | same wa|y as the|
|00000a40| 20 77 69 64 74 68 2c 0d | 75 73 69 6e 67 20 65 69 | width,.|using ei|
|00000a50| 74 68 65 72 20 61 6e 64 | 20 69 6e 74 65 67 65 72 |ther and| integer|
|00000a60| 20 63 6f 6e 73 74 61 6e | 74 2c 20 6f 72 20 61 20 | constan|t, or a |
|00000a70| 5c 76 65 72 62 2b 2a 2b | 20 74 6f 20 73 69 67 6e |\verb+*+| to sign|
|00000a80| 69 66 79 20 74 68 61 74 | 20 74 68 65 0d 63 75 72 |ify that| the.cur|
|00000a90| 72 65 6e 74 20 61 72 67 | 75 6d 65 6e 74 20 69 73 |rent arg|ument is|
|00000aa0| 20 74 6f 20 62 65 20 75 | 73 65 64 2e 0d 0d 54 68 | to be u|sed...Th|
|00000ab0| 65 20 6e 65 78 74 20 74 | 68 69 6e 67 20 74 68 61 |e next t|hing tha|
|00000ac0| 74 20 63 61 6e 20 6f 63 | 63 75 72 20 69 73 20 61 |t can oc|cur is a|
|00000ad0| 6e 20 6f 70 74 69 6f 6e | 61 6c 20 5c 76 65 72 62 |n option|al \verb|
|00000ae0| 2b 68 2b 20 6f 72 20 5c | 76 65 72 62 2b 6c 2b 0d |+h+ or \|verb+l+.|
|00000af0| 28 65 6c 6c 29 20 6d 6f | 64 69 66 69 65 72 2e 20 |(ell) mo|difier. |
|00000b00| 20 54 68 69 73 20 63 68 | 61 6e 67 65 73 20 74 68 | This ch|anges th|
|00000b10| 65 20 62 65 68 61 76 69 | 6f 72 20 6f 66 20 74 68 |e behavi|or of th|
|00000b20| 65 20 73 75 62 73 65 71 | 75 65 6e 74 20 5c 76 65 |e subseq|uent \ve|
|00000b30| 72 62 2b 69 2b 0d 61 6e | 64 20 5c 76 65 72 62 2b |rb+i+.an|d \verb+|
|00000b40| 75 2b 20 63 6f 6e 76 65 | 72 73 69 6f 6e 20 73 70 |u+ conve|rsion sp|
|00000b50| 65 63 69 66 69 65 72 73 | 2e 20 20 49 74 20 69 73 |ecifiers|. It is|
|00000b60| 20 6c 65 67 61 6c 2c 20 | 62 75 74 20 68 61 73 20 | legal, |but has |
|00000b70| 6e 6f 20 65 66 66 65 63 | 74 2c 0d 77 69 74 68 20 |no effec|t,.with |
|00000b80| 74 68 65 20 5c 76 65 72 | 62 2b 64 2b 20 73 70 65 |the \ver|b+d+ spe|
|00000b90| 63 69 66 69 65 72 2e 20 | 20 49 74 20 69 73 20 69 |cifier. | It is i|
|00000ba0| 6c 6c 65 67 61 6c 20 77 | 69 74 68 20 61 6c 6c 20 |llegal w|ith all |
|00000bb0| 6f 74 68 65 72 20 73 70 | 65 63 69 66 69 65 72 73 |other sp|ecifiers|
|00000bc0| 2e 0d 0d 54 68 65 20 66 | 69 6e 61 6c 20 74 68 69 |...The f|inal thi|
|00000bd0| 6e 67 20 74 68 61 74 20 | 6d 75 73 74 20 6f 63 63 |ng that |must occ|
|00000be0| 75 72 20 69 73 20 61 20 | 63 68 61 72 61 63 74 65 |ur is a |characte|
|00000bf0| 72 20 73 70 65 63 69 66 | 79 69 6e 67 20 74 68 65 |r specif|ying the|
|00000c00| 20 77 61 79 20 69 6e 0d | 77 68 69 63 68 20 74 68 | way in.|which th|
|00000c10| 65 20 63 75 72 72 65 6e | 74 20 76 61 72 69 61 62 |e curren|t variab|
|00000c20| 6c 65 20 69 73 20 74 6f | 20 62 65 20 64 69 73 70 |le is to| be disp|
|00000c30| 6c 61 79 65 64 2e 20 20 | 54 68 65 20 76 61 6c 69 |layed. |The vali|
|00000c40| 64 20 63 68 61 72 61 63 | 74 65 72 73 0d 61 72 65 |d charac|ters.are|
|00000c50| 0d 5c 62 65 67 69 6e 7b | 64 65 73 63 72 69 70 74 |.\begin{|descript|
|00000c60| 69 6f 6e 7d 0d 5c 69 74 | 65 6d 5b 63 5d 20 63 61 |ion}.\it|em[c] ca|
|00000c70| 75 73 65 73 20 74 68 65 | 20 61 72 67 75 6d 65 6e |uses the| argumen|
|00000c80| 74 20 74 6f 20 62 65 20 | 63 6f 6e 76 65 72 74 65 |t to be |converte|
|00000c90| 64 20 74 6f 20 61 6e 20 | 75 6e 73 69 67 6e 65 64 |d to an |unsigned|
|00000ca0| 0d 63 68 61 72 61 63 74 | 65 72 20 66 6f 72 6d 61 |.charact|er forma|
|00000cb0| 74 2e 0d 5c 69 74 65 6d | 5b 64 5d 20 77 68 69 63 |t..\item|[d] whic|
|00000cc0| 68 20 63 61 75 73 65 73 | 20 74 68 65 20 6f 75 74 |h causes| the out|
|00000cd0| 70 75 74 20 74 6f 20 62 | 65 20 64 69 73 70 6c 61 |put to b|e displa|
|00000ce0| 79 65 64 20 61 73 20 61 | 20 64 65 63 69 6d 61 6c |yed as a| decimal|
|00000cf0| 0d 73 74 72 69 6e 67 20 | 6f 66 20 74 68 65 20 66 |.string |of the f|
|00000d00| 6f 72 6d 20 7b 5c 69 74 | 20 5b 2d 5d 64 64 64 64 |orm {\it| [-]dddd|
|00000d10| 7d 2e 20 20 54 68 65 20 | 70 72 65 63 69 73 69 6f |}. The |precisio|
|00000d20| 6e 20 73 70 65 63 69 66 | 69 65 73 20 74 68 65 20 |n specif|ies the |
|00000d30| 6d 69 6e 69 6d 75 6d 0d | 6e 75 6d 62 65 72 20 6f |minimum.|number o|
|00000d40| 66 20 64 69 67 69 74 73 | 20 74 6f 20 61 70 70 65 |f digits| to appe|
|00000d50| 61 72 2c 20 77 69 74 68 | 20 61 20 64 65 66 61 75 |ar, with| a defau|
|00000d60| 6c 74 20 6f 66 20 6f 6e | 65 2e 0d 5c 69 74 65 6d |lt of on|e..\item|
|00000d70| 5b 65 5d 20 63 61 75 73 | 65 73 20 74 68 65 20 6f |[e] caus|es the o|
|00000d80| 75 74 70 75 74 20 74 6f | 20 62 65 20 64 69 73 70 |utput to| be disp|
|00000d90| 6c 61 79 65 64 20 69 6e | 20 73 63 69 65 6e 74 69 |layed in| scienti|
|00000da0| 66 69 63 0d 6e 6f 74 61 | 74 69 6f 6e 20 6f 66 20 |fic.nota|tion of |
|00000db0| 74 68 65 20 66 6f 72 6d | 20 7b 5c 69 74 20 5b 2d |the form| {\it [-|
|00000dc0| 5d 64 2e 64 64 64 7b 5c | 76 65 72 62 2b 65 2b 7d |]d.ddd{\|verb+e+}|
|00000dd0| 24 5c 70 6d 24 64 64 7d | 2c 20 77 68 65 72 65 20 |$\pm$dd}|, where |
|00000de0| 7b 5c 69 74 20 64 7d 20 | 69 73 0d 61 6e 79 20 64 |{\it d} |is.any d|
|00000df0| 69 67 69 74 2e 20 20 54 | 68 65 72 65 20 69 73 20 |igit. T|here is |
|00000e00| 61 6c 77 61 79 73 20 6f | 6e 65 20 6e 6f 6e 2d 7a |always o|ne non-z|
|00000e10| 65 72 6f 20 64 69 67 69 | 74 20 62 65 66 6f 72 65 |ero digi|t before|
|00000e20| 20 74 68 65 20 64 65 63 | 69 6d 61 6c 0d 70 6c 61 | the dec|imal.pla|
|00000e30| 63 65 20 69 66 20 74 68 | 65 20 61 72 67 75 6d 65 |ce if th|e argume|
|00000e40| 6e 74 20 69 73 20 6e 6f | 6e 2d 7a 65 72 6f 2e 20 |nt is no|n-zero. |
|00000e50| 20 54 68 65 20 70 72 65 | 63 69 73 69 6f 6e 20 73 | The pre|cision s|
|00000e60| 70 65 63 69 66 69 63 61 | 74 69 6f 6e 20 73 65 74 |pecifica|tion set|
|00000e70| 73 0d 68 6f 77 20 6d 61 | 6e 79 20 64 69 67 69 74 |s.how ma|ny digit|
|00000e80| 73 20 61 72 65 20 70 72 | 65 73 65 6e 74 20 61 66 |s are pr|esent af|
|00000e90| 74 65 72 20 74 68 65 20 | 64 65 63 69 6d 61 6c 20 |ter the |decimal |
|00000ea0| 70 6c 61 63 65 2c 20 77 | 69 74 68 20 61 20 64 65 |place, w|ith a de|
|00000eb0| 66 61 75 6c 74 20 6f 66 | 0d 73 69 78 2e 0d 5c 69 |fault of|.six..\i|
|00000ec0| 74 65 6d 5b 45 5d 20 69 | 73 20 74 68 65 20 73 61 |tem[E] i|s the sa|
|00000ed0| 6d 65 20 61 73 20 5c 76 | 65 72 62 2b 65 2b 2c 20 |me as \v|erb+e+, |
|00000ee0| 65 78 63 65 70 74 20 74 | 68 61 74 20 61 20 75 70 |except t|hat a up|
|00000ef0| 70 65 72 20 63 61 73 65 | 0d 6c 65 74 74 65 72 20 |per case|.letter |
|00000f00| 5c 76 65 72 62 2b 45 2b | 20 69 73 20 75 73 65 64 |\verb+E+| is used|
|00000f10| 20 74 6f 20 73 65 70 65 | 72 61 74 65 20 74 68 65 | to sepe|rate the|
|00000f20| 20 6d 61 6e 74 69 73 73 | 61 20 61 6e 64 20 65 78 | mantiss|a and ex|
|00000f30| 70 6f 6e 65 6e 74 20 69 | 6e 73 74 65 61 64 0d 6f |ponent i|nstead.o|
|00000f40| 66 20 61 20 6c 6f 77 65 | 72 20 63 61 73 65 20 5c |f a lowe|r case \|
|00000f50| 76 65 72 62 2b 65 2b 2e | 0d 5c 69 74 65 6d 5b 66 |verb+e+.|.\item[f|
|00000f60| 5d 20 63 61 75 73 65 73 | 20 74 68 65 20 6f 75 74 |] causes| the out|
|00000f70| 70 75 74 20 74 6f 20 62 | 65 20 64 69 73 70 6c 61 |put to b|e displa|
|00000f80| 79 65 64 20 61 73 20 61 | 20 64 65 63 69 6d 61 6c |yed as a| decimal|
|00000f90| 20 73 74 72 69 6e 67 0d | 6f 66 20 74 68 65 20 66 | string.|of the f|
|00000fa0| 6f 72 6d 20 7b 5c 69 74 | 20 64 64 64 2e 64 64 64 |orm {\it| ddd.ddd|
|00000fb0| 7d 2e 20 20 74 68 65 20 | 70 72 65 63 69 73 69 6f |}. the |precisio|
|00000fc0| 6e 20 73 70 65 63 69 66 | 69 65 73 20 68 6f 77 20 |n specif|ies how |
|00000fd0| 6d 61 6e 79 20 64 69 67 | 69 74 73 0d 73 68 6f 75 |many dig|its.shou|
|00000fe0| 6c 64 20 61 70 70 65 61 | 72 20 61 66 74 65 72 20 |ld appea|r after |
|00000ff0| 74 68 65 20 64 65 63 69 | 6d 61 6c 20 70 6c 61 63 |the deci|mal plac|
|00001000| 65 2c 20 77 69 74 68 20 | 61 20 64 65 66 61 75 6c |e, with |a defaul|
|00001010| 74 20 6f 66 20 73 69 78 | 2e 0d 5c 69 74 65 6d 5b |t of six|..\item[|
|00001020| 67 5d 20 69 73 20 74 68 | 65 20 73 61 6d 65 20 61 |g] is th|e same a|
|00001030| 73 20 5c 76 65 72 62 2b | 65 2b 20 69 73 20 74 68 |s \verb+|e+ is th|
|00001040| 65 20 65 78 70 6f 6e 65 | 6e 74 20 77 6f 75 6c 64 |e expone|nt would|
|00001050| 20 62 65 20 6c 65 73 73 | 0d 74 68 61 6e 20 2d 34 | be less|.than -4|
|00001060| 2c 20 6f 72 20 67 72 65 | 61 74 65 72 20 74 68 61 |, or gre|ater tha|
|00001070| 6e 20 74 68 65 20 70 72 | 65 63 69 73 69 6f 6e 2e |n the pr|ecision.|
|00001080| 20 20 4f 74 68 65 72 77 | 69 73 65 2c 20 69 74 20 | Otherw|ise, it |
|00001090| 69 73 20 74 68 65 20 73 | 61 6d 65 20 61 73 0d 5c |is the s|ame as.\|
|000010a0| 76 65 72 62 2b 66 2b 2e | 0d 5c 69 74 65 6d 5b 47 |verb+f+.|.\item[G|
|000010b0| 5d 20 69 73 20 74 68 65 | 20 73 61 6d 65 20 61 73 |] is the| same as|
|000010c0| 20 5c 76 65 72 62 2b 45 | 2b 20 69 73 20 74 68 65 | \verb+E|+ is the|
|000010d0| 20 65 78 70 6f 6e 65 6e | 74 20 77 6f 75 6c 64 20 | exponen|t would |
|000010e0| 62 65 20 6c 65 73 73 0d | 74 68 61 6e 20 2d 34 2c |be less.|than -4,|
|000010f0| 20 6f 72 20 67 72 65 61 | 74 65 72 20 74 68 61 6e | or grea|ter than|
|00001100| 20 74 68 65 20 70 72 65 | 63 69 73 69 6f 6e 2e 20 | the pre|cision. |
|00001110| 20 4f 74 68 65 72 77 69 | 73 65 2c 20 69 74 20 69 | Otherwi|se, it i|
|00001120| 73 20 74 68 65 20 73 61 | 6d 65 20 61 73 0d 5c 76 |s the sa|me as.\v|
|00001130| 65 72 62 2b 66 2b 2e 0d | 5c 69 74 65 6d 5b 69 5d |erb+f+..|\item[i]|
|00001140| 20 69 73 20 74 68 65 20 | 73 61 6d 65 20 61 73 20 | is the |same as |
|00001150| 5c 76 65 72 62 2b 64 2b | 2c 20 65 78 63 65 70 74 |\verb+d+|, except|
|00001160| 20 74 68 61 74 20 74 68 | 65 20 5c 76 65 72 62 2b | that th|e \verb+|
|00001170| 6c 2b 20 66 6c 61 67 0d | 6d 61 79 20 62 65 20 75 |l+ flag.|may be u|
|00001180| 73 65 64 2e 0d 5c 69 74 | 65 6d 5b 73 5d 20 6d 61 |sed..\it|em[s] ma|
|00001190| 79 20 62 65 20 75 73 65 | 64 20 74 6f 20 64 69 73 |y be use|d to dis|
|000011a0| 70 6c 61 79 20 73 74 72 | 69 6e 67 73 2e 20 20 49 |play str|ings. I|
|000011b0| 66 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 20 69 |f the ar|gument i|
|000011c0| 73 20 61 0d 73 63 61 6c | 61 72 2c 20 74 68 65 6e |s a.scal|ar, then|
|000011d0| 20 74 68 69 73 20 69 73 | 20 74 68 65 20 73 61 6d | this is| the sam|
|000011e0| 65 20 61 73 20 5c 76 65 | 72 62 2b 66 2b 2e 0d 5c |e as \ve|rb+f+..\|
|000011f0| 69 74 65 6d 5b 75 5d 20 | 64 69 73 70 6c 61 79 73 |item[u] |displays|
|00001200| 20 74 68 65 20 61 72 67 | 75 6d 65 6e 74 20 61 73 | the arg|ument as|
|00001210| 20 61 6e 20 75 6e 73 69 | 67 6e 65 64 20 69 6e 74 | an unsi|gned int|
|00001220| 65 67 65 72 20 76 61 6c | 75 65 2e 0d 54 68 65 20 |eger val|ue..The |
|00001230| 70 72 65 63 69 73 69 6f | 6e 20 73 70 65 63 69 66 |precisio|n specif|
|00001240| 69 65 73 20 74 68 65 20 | 6d 69 6e 69 6d 75 6d 20 |ies the |minimum |
|00001250| 6e 75 6d 62 65 72 20 6f | 66 20 64 69 67 69 74 73 |number o|f digits|
|00001260| 20 74 6f 20 62 65 20 64 | 69 73 70 6c 61 79 65 64 | to be d|isplayed|
|00001270| 2c 0d 77 69 74 68 20 61 | 20 64 65 66 61 75 6c 74 |,.with a| default|
|00001280| 20 76 61 6c 75 65 20 6f | 66 20 6f 6e 65 2e 0d 5c | value o|f one..\|
|00001290| 65 6e 64 7b 64 65 73 63 | 72 69 70 74 69 6f 6e 7d |end{desc|ription}|
|000012a0| 0d 0d 54 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |..The nu|mber of |
|000012b0| 61 72 67 75 6d 65 6e 74 | 73 20 6d 75 73 74 20 6d |argument|s must m|
|000012c0| 61 74 63 68 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |atch the| number |
|000012d0| 6f 66 20 63 6f 6e 76 65 | 72 73 69 6f 6e 0d 73 70 |of conve|rsion.sp|
|000012e0| 65 63 69 66 69 63 61 74 | 69 6f 6e 73 2c 20 69 6e |ecificat|ions, in|
|000012f0| 63 6c 75 64 69 6e 67 20 | 74 68 6f 73 65 20 72 65 |cluding |those re|
|00001300| 71 75 69 72 65 64 20 66 | 6f 72 20 77 69 64 74 68 |quired f|or width|
|00001310| 20 61 6e 64 20 70 72 65 | 63 69 73 69 6f 6e 0d 73 | and pre|cision.s|
|00001320| 70 65 63 69 66 69 63 61 | 74 69 6f 6e 73 2e 20 0d |pecifica|tions. .|
|00001330| 0d 5c 76 65 72 62 2b 73 | 70 72 69 6e 74 66 2b 20 |.\verb+s|printf+ |
|00001340| 63 61 6e 6e 6f 74 20 70 | 72 69 6e 74 20 6f 75 74 |cannot p|rint out|
|00001350| 20 77 68 6f 6c 65 20 6d | 61 74 72 69 63 65 73 20 | whole m|atrices |
|00001360| 6f 72 20 6c 69 73 74 73 | 2e 0d 0d 0d 0d 0d 5c 70 |or lists|......\p|
|00001370| 61 72 61 67 72 61 70 68 | 7b 45 78 61 6d 70 6c 65 |aragraph|{Example|
|00001380| 7d 0d 5c 69 6e 64 65 78 | 7b 65 78 61 6d 70 6c 65 |}.\index|{example|
|00001390| 20 6f 66 20 73 70 72 69 | 6e 74 66 28 29 7d 0d 5c | of spri|ntf()}.\|
|000013a0| 69 6e 64 65 78 7b 73 70 | 72 69 6e 74 66 28 29 21 |index{sp|rintf()!|
|000013b0| 65 78 61 6d 70 6c 65 7d | 0d 5c 62 65 67 69 6e 7b |example}|.\begin{|
|000013c0| 76 65 72 62 61 74 69 6d | 7d 0d 44 75 6d 6d 79 20 |verbatim|}.Dummy |
|000013d0| 45 78 61 6d 70 6c 65 0d | 5c 65 6e 64 7b 76 65 72 |Example.|\end{ver|
|000013e0| 62 61 74 69 6d 7d 0d 0d | 53 65 65 20 61 6c 73 6f |batim}..|See also|
|000013f0| 3a 20 50 61 67 65 7e 5c | 70 61 67 65 72 65 66 7b |: Page~\|pageref{|
|00001400| 66 6e 3a 66 70 72 69 6e | 74 66 7d 20 5c 76 65 72 |fn:fprin|tf} \ver|
|00001410| 62 2b 66 70 72 69 6e 74 | 66 28 29 2b 2c 0d 50 61 |b+fprint|f()+,.Pa|
|00001420| 67 65 7e 5c 70 61 67 65 | 72 65 66 7b 66 6e 3a 70 |ge~\page|ref{fn:p|
|00001430| 72 69 6e 74 66 7d 20 5c | 76 65 72 62 2b 70 72 69 |rintf} \|verb+pri|
|00001440| 6e 74 66 28 29 2b 2c 0d | 50 61 67 65 7e 5c 70 61 |ntf()+,.|Page~\pa|
|00001450| 67 65 72 65 66 7b 66 6e | 3a 72 65 61 64 7d 20 5c |geref{fn|:read} \|
|00001460| 76 65 72 62 2b 72 65 61 | 64 28 29 2b 2c 0d 50 61 |verb+rea|d()+,.Pa|
|00001470| 67 65 7e 5c 70 61 67 65 | 72 65 66 7b 66 6e 3a 77 |ge~\page|ref{fn:w|
|00001480| 72 69 74 65 7d 20 5c 76 | 65 72 62 2b 77 72 69 74 |rite} \v|erb+writ|
|00001490| 65 28 29 2b 2e 0d 0d 5c | 6e 65 77 70 61 67 65 0d |e()+...\|newpage.|
|000014a0| 0d 0d | |.. | |
+--------+-------------------------+-------------------------+--------+--------+