home *** CD-ROM | disk | FTP | other *** search
/ Big Green CD 8 / BGCD_8_Dev.iso / OPENSTEP / Languages / Python / python-14-src / Doc / libarray.tex / node1_ct.html < prev    next >
LaTeX Document  |  1997-01-17  |  4.9 KB

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: LaTeX Document (document/latex).

ConfidenceProgramDetectionMatch TypeSupport
100% dexvert LaTeX Document (document/latex) magic Supported
90% dexvert Hypertext Markup Language File (text/html) magic Supported
1% dexvert Text File (text/txt) fallback Supported
100% file HTML document text default (weak)
99% file LaTeX document text default
98% file exported SGML document text default
97% file C source text default
96% file exported SGML document, ASCII text default
80% TrID HyperText Markup Language with DOCTYPE default
19% TrID HyperText Markup Language default
100% checkBytes Printable ASCII default
100% perlTextCheck Likely Text (Perl) default
100% gt2 HTML (Hyper Text Markup Language) Datei default
100% detectItEasy Format: plain text[LF] default (weak)
100% xdgMime text/html default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 3c 21 44 4f 43 54 59 50 | 45 20 48 54 4d 4c 20 50 |<!DOCTYP|E HTML P|
|00000010| 55 42 4c 49 43 20 22 2d | 2f 2f 57 33 43 2f 2f 44 |UBLIC "-|//W3C//D|
|00000020| 54 44 20 48 54 4d 4c 20 | 33 2e 32 20 46 69 6e 61 |TD HTML |3.2 Fina|
|00000030| 6c 2f 2f 65 6e 22 3e 0a | 0a 3c 21 2d 2d 43 6f 6e |l//en">.|.<!--Con|
|00000040| 76 65 72 74 65 64 20 77 | 69 74 68 20 4c 61 54 65 |verted w|ith LaTe|
|00000050| 58 32 48 54 4d 4c 20 32 | 30 32 32 20 28 52 65 6c |X2HTML 2|022 (Rel|
|00000060| 65 61 73 65 64 20 4a 61 | 6e 75 61 72 79 20 31 2c |eased Ja|nuary 1,|
|00000070| 20 32 30 32 32 29 20 2d | 2d 3e 0a 3c 48 54 4d 4c | 2022) -|->.<HTML|
|00000080| 20 6c 61 6e 67 3d 22 65 | 6e 22 3e 0a 3c 48 45 41 | lang="e|n">.<HEA|
|00000090| 44 3e 0a 3c 54 49 54 4c | 45 3e 43 6f 6e 74 65 6e |D>.<TITL|E>Conten|
|000000a0| 74 73 20 6f 66 20 42 75 | 69 6c 74 2d 69 6e 20 4d |ts of Bu|ilt-in M|
|000000b0| 6f 64 75 6c 65 20 61 72 | 72 61 79 3c 2f 54 49 54 |odule ar|ray</TIT|
|000000c0| 4c 45 3e 0a 0a 3c 4d 45 | 54 41 20 48 54 54 50 2d |LE>..<ME|TA HTTP-|
|000000d0| 45 51 55 49 56 3d 22 43 | 6f 6e 74 65 6e 74 2d 54 |EQUIV="C|ontent-T|
|000000e0| 79 70 65 22 20 43 4f 4e | 54 45 4e 54 3d 22 74 65 |ype" CON|TENT="te|
|000000f0| 78 74 2f 68 74 6d 6c 3b | 20 63 68 61 72 73 65 74 |xt/html;| charset|
|00000100| 3d 75 74 66 2d 38 22 3e | 0a 3c 4d 45 54 41 20 4e |=utf-8">|.<META N|
|00000110| 41 4d 45 3d 22 76 69 65 | 77 70 6f 72 74 22 20 43 |AME="vie|wport" C|
|00000120| 4f 4e 54 45 4e 54 3d 22 | 77 69 64 74 68 3d 64 65 |ONTENT="|width=de|
|00000130| 76 69 63 65 2d 77 69 64 | 74 68 2c 20 69 6e 69 74 |vice-wid|th, init|
|00000140| 69 61 6c 2d 73 63 61 6c | 65 3d 31 2e 30 22 3e 0a |ial-scal|e=1.0">.|
|00000150| 3c 4d 45 54 41 20 4e 41 | 4d 45 3d 22 47 65 6e 65 |<META NA|ME="Gene|
|00000160| 72 61 74 6f 72 22 20 43 | 4f 4e 54 45 4e 54 3d 22 |rator" C|ONTENT="|
|00000170| 4c 61 54 65 58 32 48 54 | 4d 4c 20 76 32 30 32 32 |LaTeX2HT|ML v2022|
|00000180| 22 3e 0a 0a 3c 4c 49 4e | 4b 20 52 45 4c 3d 22 53 |">..<LIN|K REL="S|
|00000190| 54 59 4c 45 53 48 45 45 | 54 22 20 48 52 45 46 3d |TYLESHEE|T" HREF=|
|000001a0| 22 6c 69 62 61 72 72 61 | 79 2e 63 73 73 22 3e 0a |"libarra|y.css">.|
|000001b0| 0a 3c 4c 49 4e 4b 20 52 | 45 4c 3d 22 70 72 65 76 |.<LINK R|EL="prev|
|000001c0| 69 6f 75 73 22 20 48 52 | 45 46 3d 22 6c 69 62 61 |ious" HR|EF="liba|
|000001d0| 72 72 61 79 5f 6d 6e 2e | 68 74 6d 6c 22 3e 0a 3c |rray_mn.|html">.<|
|000001e0| 4c 49 4e 4b 20 52 45 4c | 3d 22 75 70 22 20 48 52 |LINK REL|="up" HR|
|000001f0| 45 46 3d 22 6c 69 62 61 | 72 72 61 79 5f 6d 6e 2e |EF="liba|rray_mn.|
|00000200| 68 74 6d 6c 22 3e 0a 3c | 2f 48 45 41 44 3e 0a 20 |html">.<|/HEAD>. |
|00000210| 0a 3c 42 4f 44 59 20 62 | 67 63 6f 6c 6f 72 3d 22 |.<BODY b|gcolor="|
|00000220| 23 66 66 66 66 66 66 22 | 20 74 65 78 74 3d 22 23 |#ffffff"| text="#|
|00000230| 30 30 30 30 30 30 22 20 | 6c 69 6e 6b 3d 22 23 39 |000000" |link="#9|
|00000240| 39 34 34 45 45 22 20 76 | 6c 69 6e 6b 3d 22 23 30 |944EE" v|link="#0|
|00000250| 30 30 30 66 66 22 20 61 | 6c 69 6e 6b 3d 22 23 30 |000ff" a|link="#0|
|00000260| 30 66 66 30 30 22 3e 0a | 0a 3c 48 31 3e 3c 41 20 |0ff00">.|.<H1><A |
|00000270| 49 44 3d 22 53 45 43 54 | 49 4f 4e 30 30 30 31 30 |ID="SECT|ION00010|
|00000280| 30 30 30 30 30 30 30 30 | 30 30 30 30 30 30 30 22 |00000000|0000000"|
|00000290| 3e 0a 42 75 69 6c 74 2d | 69 6e 20 4d 6f 64 75 6c |>.Built-|in Modul|
|000002a0| 65 20 61 72 72 61 79 3c | 2f 41 3e 0a 3c 2f 48 31 |e array<|/A>.</H1|
|000002b0| 3e 0a 61 72 72 61 79 0a | 3c 41 20 49 44 3d 22 33 |>.array.|<A ID="3|
|000002c0| 22 3e 3c 2f 41 3e 0a 0a | 3c 50 3e 0a 54 68 69 73 |"></A>..|<P>.This|
|000002d0| 20 6d 6f 64 75 6c 65 20 | 64 65 66 69 6e 65 73 20 | module |defines |
|000002e0| 61 20 6e 65 77 20 6f 62 | 6a 65 63 74 20 74 79 70 |a new ob|ject typ|
|000002f0| 65 20 77 68 69 63 68 20 | 63 61 6e 20 65 66 66 69 |e which |can effi|
|00000300| 63 69 65 6e 74 6c 79 20 | 72 65 70 72 65 73 65 6e |ciently |represen|
|00000310| 74 0a 61 6e 20 61 72 72 | 61 79 20 6f 66 20 62 61 |t.an arr|ay of ba|
|00000320| 73 69 63 20 76 61 6c 75 | 65 73 3a 20 63 68 61 72 |sic valu|es: char|
|00000330| 61 63 74 65 72 73 2c 20 | 69 6e 74 65 67 65 72 73 |acters, |integers|
|00000340| 2c 20 66 6c 6f 61 74 69 | 6e 67 20 70 6f 69 6e 74 |, floati|ng point|
|00000350| 0a 6e 75 6d 62 65 72 73 | 2e 20 20 41 72 72 61 79 |.numbers|. Array|
|00000360| 73 20 61 72 65 20 73 65 | 71 75 65 6e 63 65 20 74 |s are se|quence t|
|00000370| 79 70 65 73 20 61 6e 64 | 20 62 65 68 61 76 65 20 |ypes and| behave |
|00000380| 76 65 72 79 20 6d 75 63 | 68 20 6c 69 6b 65 20 6c |very muc|h like l|
|00000390| 69 73 74 73 2c 0a 65 78 | 63 65 70 74 20 74 68 61 |ists,.ex|cept tha|
|000003a0| 74 20 74 68 65 20 74 79 | 70 65 20 6f 66 20 6f 62 |t the ty|pe of ob|
|000003b0| 6a 65 63 74 73 20 73 74 | 6f 72 65 64 20 69 6e 20 |jects st|ored in |
|000003c0| 74 68 65 6d 20 69 73 20 | 63 6f 6e 73 74 72 61 69 |them is |constrai|
|000003d0| 6e 65 64 2e 20 20 54 68 | 65 0a 74 79 70 65 20 69 |ned. Th|e.type i|
|000003e0| 73 20 73 70 65 63 69 66 | 69 65 64 20 61 74 20 6f |s specif|ied at o|
|000003f0| 62 6a 65 63 74 20 63 72 | 65 61 74 69 6f 6e 20 74 |bject cr|eation t|
|00000400| 69 6d 65 20 62 79 20 75 | 73 69 6e 67 20 61 20 74 |ime by u|sing a t|
|00000410| 79 70 65 20 63 6f 64 65 | 2c 0a 77 68 69 63 68 20 |ype code|,.which |
|00000420| 69 73 20 61 20 73 69 6e | 67 6c 65 20 63 68 61 72 |is a sin|gle char|
|00000430| 61 63 74 65 72 2e 20 20 | 54 68 65 20 66 6f 6c 6c |acter. |The foll|
|00000440| 6f 77 69 6e 67 20 74 79 | 70 65 20 63 6f 64 65 73 |owing ty|pe codes|
|00000450| 20 61 72 65 20 64 65 66 | 69 6e 65 64 3a 0a 0a 3c | are def|ined:..<|
|00000460| 50 3e 0a 3c 42 52 3e 0a | 3c 49 4d 47 0a 20 53 54 |P>.<BR>.|<IMG. ST|
|00000470| 59 4c 45 3d 22 68 65 69 | 67 68 74 3a 20 33 31 34 |YLE="hei|ght: 314|
|00000480| 2e 30 30 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.00ex; "| SRC="im|
|00000490| 67 31 2e 70 6e 67 22 0a | 20 41 4c 54 3d 22 5c 62 |g1.png".| ALT="\b|
|000004a0| 65 67 69 6e 7b 74 61 62 | 6c 65 69 69 69 7d 7b 5c |egin{tab|leiii}{\|
|000004b0| 76 65 72 74 20 63 5c 76 | 65 72 74 20 63 5c 76 65 |vert c\v|ert c\ve|
|000004c0| 72 74 20 63 5c 76 65 72 | 74 7d 7b 63 6f 64 65 7d |rt c\ver|t}{code}|
|000004d0| 7b 54 79 70 65 63 6f 64 | 65 7d 7b 54 79 70 65 7d |{Typecod|e}{Type}|
|000004e0| 7b 4d 69 6e 69 6d 61 6c | 20 73 69 7a 65 20 2e 2e |{Minimal| size ..|
|000004f0| 2e 0a 2e 2e 2e 5c 6c 69 | 6e 65 69 69 69 7b 27 66 |.....\li|neiii{'f|
|00000500| 27 7d 7b 66 6c 6f 61 74 | 69 6e 67 20 70 6f 69 6e |'}{float|ing poin|
|00000510| 74 7d 7b 34 7d 0a 5c 6c | 69 6e 65 69 69 69 7b 27 |t}{4}.\l|ineiii{'|
|00000520| 64 27 7d 7b 66 6c 6f 61 | 74 69 6e 67 20 70 6f 69 |d'}{floa|ting poi|
|00000530| 6e 74 7d 7b 38 7d 0a 5c | 65 6e 64 7b 74 61 62 6c |nt}{8}.\|end{tabl|
|00000540| 65 69 69 69 7d 22 3e 0a | 3c 42 52 3e 0a 0a 3c 50 |eiii}">.|<BR>..<P|
|00000550| 3e 0a 54 68 65 20 61 63 | 74 75 61 6c 20 72 65 70 |>.The ac|tual rep|
|00000560| 72 65 73 65 6e 74 61 74 | 69 6f 6e 20 6f 66 20 76 |resentat|ion of v|
|00000570| 61 6c 75 65 73 20 69 73 | 20 64 65 74 65 72 6d 69 |alues is| determi|
|00000580| 6e 65 64 20 62 79 20 74 | 68 65 20 6d 61 63 68 69 |ned by t|he machi|
|00000590| 6e 65 0a 61 72 63 68 69 | 74 65 63 74 75 72 65 20 |ne.archi|tecture |
|000005a0| 28 73 74 72 69 63 74 6c | 79 20 73 70 65 61 6b 69 |(strictl|y speaki|
|000005b0| 6e 67 2c 20 62 79 20 74 | 68 65 20 43 20 69 6d 70 |ng, by t|he C imp|
|000005c0| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 29 2e 20 20 54 |lementat|ion). T|
|000005d0| 68 65 20 61 63 74 75 61 | 6c 0a 73 69 7a 65 20 63 |he actua|l.size c|
|000005e0| 61 6e 20 62 65 20 61 63 | 63 65 73 73 65 64 20 74 |an be ac|cessed t|
|000005f0| 68 72 6f 75 67 68 20 74 | 68 65 20 69 74 65 6d 73 |hrough t|he items|
|00000600| 69 7a 65 20 61 74 74 72 | 69 62 75 74 65 2e 0a 0a |ize attr|ibute...|
|00000610| 3c 50 3e 0a 53 65 65 20 | 61 6c 73 6f 20 62 75 69 |<P>.See |also bui|
|00000620| 6c 74 2d 69 6e 20 6d 6f | 64 75 6c 65 20 73 74 72 |lt-in mo|dule str|
|00000630| 75 63 74 2e 0a 73 74 72 | 75 63 74 0a 0a 3c 50 3e |uct..str|uct..<P>|
|00000640| 0a 54 68 65 20 6d 6f 64 | 75 6c 65 20 64 65 66 69 |.The mod|ule defi|
|00000650| 6e 65 73 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |nes the |followin|
|00000660| 67 20 66 75 6e 63 74 69 | 6f 6e 3a 0a 0a 3c 50 3e |g functi|on:..<P>|
|00000670| 0a 0a 3c 50 3e 0a 3c 42 | 52 3e 0a 3c 49 4d 47 0a |..<P>.<B|R>.<IMG.|
|00000680| 20 20 53 54 59 4c 45 3d | 22 68 65 69 67 68 74 3a | STYLE=|"height:|
|00000690| 20 32 2e 31 30 65 78 3b | 20 76 65 72 74 69 63 61 | 2.10ex;| vertica|
|000006a0| 6c 2d 61 6c 69 67 6e 3a | 20 31 37 36 2e 35 35 65 |l-align:| 176.55e|
|000006b0| 78 3b 20 22 20 53 52 43 | 3d 22 69 6d 67 32 2e 70 |x; " SRC|="img2.p|
|000006c0| 6e 67 22 0a 20 41 4c 54 | 3d 22 5c 62 65 67 69 6e |ng". ALT|="\begin|
|000006d0| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 61 72 72 61 79 |{funcdes|c}{array|
|000006e0| 7d 7b 74 79 70 65 63 6f | 64 65 5c 6f 70 74 69 6f |}{typeco|de\optio|
|000006f0| 6e 61 6c 7b 5c 2c 20 69 | 6e 69 74 69 61 6c 69 7a |nal{\, i|nitializ|
|00000700| 65 72 7d 7d 0a 52 65 74 | 75 72 6e 20 61 20 6e 65 |er}}.Ret|urn a ne|
|00000710| 77 20 61 72 72 61 79 20 | 77 68 2e 2e 2e 0a 2e 2e |w array |wh......|
|00000720| 2e 6f 6d 73 74 72 69 6e | 67 28 29 7d 20 6d 65 74 |.omstrin|g()} met|
|00000730| 68 6f 64 20 28 73 65 65 | 20 62 65 6c 6f 77 29 20 |hod (see| below) |
|00000740| 74 6f 20 61 64 64 0a 69 | 6e 69 74 69 61 6c 20 69 |to add.i|nitial i|
|00000750| 74 65 6d 73 20 74 6f 20 | 74 68 65 20 61 72 72 61 |tems to |the arra|
|00000760| 79 2e 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |y..\end{|funcdesc|
|00000770| 7d 22 3e 0a 3c 42 52 3e | 0a 0a 3c 50 3e 0a 41 72 |}">.<BR>|..<P>.Ar|
|00000780| 72 61 79 20 6f 62 6a 65 | 63 74 73 20 73 75 70 70 |ray obje|cts supp|
|00000790| 6f 72 74 20 74 68 65 20 | 66 6f 6c 6c 6f 77 69 6e |ort the |followin|
|000007a0| 67 20 64 61 74 61 20 69 | 74 65 6d 73 20 61 6e 64 |g data i|tems and|
|000007b0| 20 6d 65 74 68 6f 64 73 | 3a 0a 0a 3c 50 3e 0a 3c | methods|:..<P>.<|
|000007c0| 42 52 3e 0a 3c 49 4d 47 | 0a 20 20 53 54 59 4c 45 |BR>.<IMG|. STYLE|
|000007d0| 3d 22 68 65 69 67 68 74 | 3a 20 32 2e 31 37 65 78 |="height|: 2.17ex|
|000007e0| 3b 20 76 65 72 74 69 63 | 61 6c 2d 61 6c 69 67 6e |; vertic|al-align|
|000007f0| 3a 20 31 37 36 2e 35 34 | 65 78 3b 20 22 20 53 52 |: 176.54|ex; " SR|
|00000800| 43 3d 22 69 6d 67 33 2e | 70 6e 67 22 0a 20 41 4c |C="img3.|png". AL|
|00000810| 54 3d 22 5c 62 65 67 69 | 6e 7b 64 61 74 61 64 65 |T="\begi|n{datade|
|00000820| 73 63 7d 7b 74 79 70 65 | 63 6f 64 65 7d 0a 54 68 |sc}{type|code}.Th|
|00000830| 65 20 74 79 70 65 63 6f | 64 65 20 63 68 61 72 61 |e typeco|de chara|
|00000840| 63 74 65 72 20 75 73 65 | 64 20 74 6f 20 63 72 65 |cter use|d to cre|
|00000850| 61 74 65 20 74 68 65 20 | 61 72 72 61 79 2e 0a 5c |ate the |array..\|
|00000860| 65 6e 64 7b 64 61 74 61 | 64 65 73 63 7d 22 3e 0a |end{data|desc}">.|
|00000870| 3c 42 52 3e 0a 0a 3c 50 | 3e 0a 3c 42 52 3e 0a 3c |<BR>..<P|>.<BR>.<|
|00000880| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|00000890| 67 68 74 3a 20 32 2e 31 | 30 65 78 3b 20 76 65 72 |ght: 2.1|0ex; ver|
|000008a0| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|000008b0| 2e 36 38 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.68ex; "| SRC="im|
|000008c0| 67 34 2e 70 6e 67 22 0a | 20 41 4c 54 3d 22 5c 62 |g4.png".| ALT="\b|
|000008d0| 65 67 69 6e 7b 64 61 74 | 61 64 65 73 63 7d 7b 69 |egin{dat|adesc}{i|
|000008e0| 74 65 6d 73 69 7a 65 7d | 0a 54 68 65 20 6c 65 6e |temsize}|.The len|
|000008f0| 67 74 68 20 69 6e 20 62 | 79 74 65 73 20 6f 66 20 |gth in b|ytes of |
|00000900| 6f 6e 65 20 61 72 72 61 | 79 20 69 74 65 6d 20 69 |one arra|y item i|
|00000910| 6e 20 74 68 65 20 69 6e | 74 65 72 6e 61 6c 20 72 |n the in|ternal r|
|00000920| 65 70 72 65 73 65 6e 74 | 61 74 69 6f 6e 2e 0a 5c |epresent|ation..\|
|00000930| 65 6e 64 7b 64 61 74 61 | 64 65 73 63 7d 22 3e 0a |end{data|desc}">.|
|00000940| 3c 42 52 3e 0a 0a 3c 50 | 3e 0a 3c 42 52 3e 0a 3c |<BR>..<P|>.<BR>.<|
|00000950| 49 4d 47 0a 20 20 53 54 | 59 4c 45 3d 22 68 65 69 |IMG. ST|YLE="hei|
|00000960| 67 68 74 3a 20 32 2e 31 | 37 65 78 3b 20 76 65 72 |ght: 2.1|7ex; ver|
|00000970| 74 69 63 61 6c 2d 61 6c | 69 67 6e 3a 20 31 37 36 |tical-al|ign: 176|
|00000980| 2e 36 38 65 78 3b 20 22 | 20 53 52 43 3d 22 69 6d |.68ex; "| SRC="im|
|00000990| 67 35 2e 70 6e 67 22 0a | 20 41 4c 54 3d 22 5c 62 |g5.png".| ALT="\b|
|000009a0| 65 67 69 6e 7b 66 75 6e | 63 64 65 73 63 7d 7b 61 |egin{fun|cdesc}{a|
|000009b0| 70 70 65 6e 64 7d 7b 78 | 7d 0a 41 70 70 65 6e 64 |ppend}{x|}.Append|
|000009c0| 20 61 20 6e 65 77 20 69 | 74 65 6d 20 77 69 74 68 | a new i|tem with|
|000009d0| 20 76 61 6c 75 65 20 5c | 76 61 72 7b 78 7d 20 74 | value \|var{x} t|
|000009e0| 6f 20 74 68 65 20 65 6e | 64 20 6f 66 20 74 68 65 |o the en|d of the|
|000009f0| 20 61 72 72 61 79 2e 0a | 5c 65 6e 64 7b 66 75 6e | array..|\end{fun|
|00000a00| 63 64 65 73 63 7d 22 3e | 0a 3c 42 52 3e 0a 0a 3c |cdesc}">|.<BR>..<|
|00000a10| 50 3e 0a 3c 42 52 3e 0a | 3c 49 4d 47 0a 20 20 53 |P>.<BR>.|<IMG. S|
|00000a20| 54 59 4c 45 3d 22 68 65 | 69 67 68 74 3a 20 32 2e |TYLE="he|ight: 2.|
|00000a30| 31 37 65 78 3b 20 76 65 | 72 74 69 63 61 6c 2d 61 |17ex; ve|rtical-a|
|00000a40| 6c 69 67 6e 3a 20 31 37 | 36 2e 36 38 65 78 3b 20 |lign: 17|6.68ex; |
|00000a50| 22 20 53 52 43 3d 22 69 | 6d 67 36 2e 70 6e 67 22 |" SRC="i|mg6.png"|
|00000a60| 0a 20 41 4c 54 3d 22 5c | 62 65 67 69 6e 7b 66 75 |. ALT="\|begin{fu|
|00000a70| 6e 63 64 65 73 63 7d 7b | 62 79 74 65 73 77 61 70 |ncdesc}{|byteswap|
|00000a80| 7d 7b 78 7d 0a 5c 6c 71 | 5c 6c 71 20 42 79 74 65 |}{x}.\lq|\lq Byte|
|00000a90| 73 77 61 70 27 27 20 61 | 6c 6c 20 69 74 65 6d 73 |swap'' a|ll items|
|00000aa0| 20 6f 66 20 74 68 65 20 | 61 72 72 61 79 2e 20 54 | of the |array. T|
|00000ab0| 68 69 73 20 69 73 20 6f | 6e 6c 79 20 2e 2e 2e 0a |his is o|nly ....|
|00000ac0| 2e 2e 2e 61 74 61 20 66 | 72 6f 6d 20 61 20 66 69 |...ata f|rom a fi|
|00000ad0| 6c 65 20 77 72 69 74 74 | 65 6e 0a 6f 6e 20 61 20 |le writt|en.on a |
|00000ae0| 6d 61 63 68 69 6e 65 20 | 77 69 74 68 20 61 20 64 |machine |with a d|
|00000af0| 69 66 66 65 72 65 6e 74 | 20 62 79 74 65 20 6f 72 |ifferent| byte or|
|00000b00| 64 65 72 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |der..\en|d{funcde|
|00000b10| 73 63 7d 22 3e 0a 3c 42 | 52 3e 0a 0a 3c 50 3e 0a |sc}">.<B|R>..<P>.|
|00000b20| 3c 42 52 3e 0a 3c 49 4d | 47 0a 20 20 53 54 59 4c |<BR>.<IM|G. STYL|
|00000b30| 45 3d 22 68 65 69 67 68 | 74 3a 20 32 2e 31 37 65 |E="heigh|t: 2.17e|
|00000b40| 78 3b 20 76 65 72 74 69 | 63 61 6c 2d 61 6c 69 67 |x; verti|cal-alig|
|00000b50| 6e 3a 20 31 37 36 2e 35 | 35 65 78 3b 20 22 20 53 |n: 176.5|5ex; " S|
|00000b60| 52 43 3d 22 69 6d 67 37 | 2e 70 6e 67 22 0a 20 41 |RC="img7|.png". A|
|00000b70| 4c 54 3d 22 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |LT="\beg|in{funcd|
|00000b80| 65 73 63 7d 7b 66 72 6f | 6d 66 69 6c 65 7d 7b 66 |esc}{fro|mfile}{f|
|00000b90| 5c 2c 20 6e 7d 0a 52 65 | 61 64 20 5c 76 61 72 7b |\, n}.Re|ad \var{|
|00000ba0| 6e 7d 20 69 74 65 6d 73 | 20 28 61 73 20 6d 61 63 |n} items| (as mac|
|00000bb0| 68 69 6e 65 20 76 61 6c | 75 65 73 29 20 66 72 6f |hine val|ues) fro|
|00000bc0| 6d 20 74 68 2e 2e 2e 0a | 2e 2e 2e 66 69 6c 65 20 |m th....|...file |
|00000bd0| 6f 62 6a 65 63 74 3b 20 | 73 6f 6d 65 74 68 69 6e |object; |somethin|
|00000be0| 67 20 65 6c 73 65 20 77 | 69 74 68 20 61 20 5c 63 |g else w|ith a \c|
|00000bf0| 6f 64 65 7b 72 65 61 64 | 28 29 7d 20 6d 65 74 68 |ode{read|()} meth|
|00000c00| 6f 64 20 77 6f 6e 27 74 | 0a 64 6f 2e 0a 5c 65 6e |od won't|.do..\en|
|00000c10| 64 7b 66 75 6e 63 64 65 | 73 63 7d 22 3e 0a 3c 42 |d{funcde|sc}">.<B|
|00000c20| 52 3e 0a 0a 3c 50 3e 0a | 3c 42 52 3e 0a 3c 49 4d |R>..<P>.|<BR>.<IM|
|00000c30| 47 0a 20 20 53 54 59 4c | 45 3d 22 68 65 69 67 68 |G. STYL|E="heigh|
|00000c40| 74 3a 20 32 2e 33 38 65 | 78 3b 20 76 65 72 74 69 |t: 2.38e|x; verti|
|00000c50| 63 61 6c 2d 61 6c 69 67 | 6e 3a 20 31 37 36 2e 32 |cal-alig|n: 176.2|
|00000c60| 37 65 78 3b 20 22 20 53 | 52 43 3d 22 69 6d 67 38 |7ex; " S|RC="img8|
|00000c70| 2e 70 6e 67 22 0a 20 41 | 4c 54 3d 22 5c 62 65 67 |.png". A|LT="\beg|
|00000c80| 69 6e 7b 66 75 6e 63 64 | 65 73 63 7d 7b 66 72 6f |in{funcd|esc}{fro|
|00000c90| 6d 6c 69 73 74 7d 7b 6c | 69 73 74 7d 0a 41 70 70 |mlist}{l|ist}.App|
|00000ca0| 65 6e 64 20 69 74 65 6d | 73 20 66 72 6f 6d 20 74 |end item|s from t|
|00000cb0| 68 65 20 6c 69 73 74 2e | 20 54 68 69 73 20 69 73 |he list.| This is|
|00000cc0| 20 65 71 75 69 76 61 6c | 65 6e 74 20 2e 2e 2e 0a | equival|ent ....|
|00000cd0| 2e 2e 2e 78 29 7d 0a 65 | 78 63 65 70 74 20 74 68 |...x)}.e|xcept th|
|00000ce0| 61 74 20 69 66 20 74 68 | 65 72 65 20 69 73 20 61 |at if th|ere is a|
|00000cf0| 20 74 79 70 65 20 65 72 | 72 6f 72 2c 20 74 68 65 | type er|ror, the|
|00000d00| 20 61 72 72 61 79 20 69 | 73 20 75 6e 63 68 61 6e | array i|s unchan|
|00000d10| 67 65 64 2e 0a 5c 65 6e | 64 7b 66 75 6e 63 64 65 |ged..\en|d{funcde|
|00000d20| 73 63 7d 22 3e 0a 3c 42 | 52 3e 0a 0a 3c 50 3e 0a |sc}">.<B|R>..<P>.|
|00000d30| 3c 42 52 3e 0a 3c 49 4d | 47 0a 20 20 53 54 59 4c |<BR>.<IM|G. STYL|
|00000d40| 45 3d 22 68 65 69 67 68 | 74 3a 20 32 2e 33 38 65 |E="heigh|t: 2.38e|
|00000d50| 78 3b 20 76 65 72 74 69 | 63 61 6c 2d 61 6c 69 67 |x; verti|cal-alig|
|00000d60| 6e 3a 20 31 37 36 2e 32 | 37 65 78 3b 20 22 20 53 |n: 176.2|7ex; " S|
|00000d70| 52 43 3d 22 69 6d 67 39 | 2e 70 6e 67 22 0a 20 41 |RC="img9|.png". A|
|00000d80| 4c 54 3d 22 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |LT="\beg|in{funcd|
|00000d90| 65 73 63 7d 7b 66 72 6f | 6d 73 74 72 69 6e 67 7d |esc}{fro|mstring}|
|00000da0| 7b 73 7d 0a 41 70 70 65 | 6e 64 73 20 69 74 65 6d |{s}.Appe|nds item|
|00000db0| 73 20 66 72 6f 6d 20 74 | 68 65 20 73 74 72 69 6e |s from t|he strin|
|00000dc0| 67 2c 20 69 6e 74 65 72 | 70 72 65 74 69 6e 67 20 |g, inter|preting |
|00000dd0| 74 68 65 20 2e 2e 2e 0a | 2e 2e 2e 69 74 20 68 61 |the ....|...it ha|
|00000de0| 64 20 62 65 65 6e 20 72 | 65 61 64 20 66 72 6f 6d |d been r|ead from|
|00000df0| 20 61 0a 66 69 6c 65 20 | 75 73 69 6e 67 20 74 68 | a.file |using th|
|00000e00| 65 20 5c 63 6f 64 65 7b | 66 72 6f 6d 66 69 6c 65 |e \code{|fromfile|
|00000e10| 28 29 7d 20 6d 65 74 68 | 6f 64 29 2e 0a 5c 65 6e |()} meth|od)..\en|
|00000e20| 64 7b 66 75 6e 63 64 65 | 73 63 7d 22 3e 0a 3c 42 |d{funcde|sc}">.<B|
|00000e30| 52 3e 0a 0a 3c 50 3e 0a | 3c 42 52 3e 0a 3c 49 4d |R>..<P>.|<BR>.<IM|
|00000e40| 47 0a 20 20 53 54 59 4c | 45 3d 22 68 65 69 67 68 |G. STYL|E="heigh|
|00000e50| 74 3a 20 32 2e 33 38 65 | 78 3b 20 76 65 72 74 69 |t: 2.38e|x; verti|
|00000e60| 63 61 6c 2d 61 6c 69 67 | 6e 3a 20 31 37 36 2e 34 |cal-alig|n: 176.4|
|00000e70| 30 65 78 3b 20 22 20 53 | 52 43 3d 22 69 6d 67 31 |0ex; " S|RC="img1|
|00000e80| 30 2e 70 6e 67 22 0a 20 | 41 4c 54 3d 22 5c 62 65 |0.png". |ALT="\be|
|00000e90| 67 69 6e 7b 66 75 6e 63 | 64 65 73 63 7d 7b 69 6e |gin{func|desc}{in|
|00000ea0| 73 65 72 74 7d 7b 69 5c | 2c 20 78 7d 0a 49 6e 73 |sert}{i\|, x}.Ins|
|00000eb0| 65 72 74 20 61 20 6e 65 | 77 20 69 74 65 6d 20 77 |ert a ne|w item w|
|00000ec0| 69 74 68 20 76 61 6c 75 | 65 20 5c 76 61 72 7b 78 |ith valu|e \var{x|
|00000ed0| 7d 20 69 6e 20 74 68 65 | 20 61 72 72 61 79 20 62 |} in the| array b|
|00000ee0| 65 66 6f 72 65 20 70 6f | 73 69 74 69 6f 6e 0a 5c |efore po|sition.\|
|00000ef0| 76 61 72 7b 69 7d 2e 0a | 5c 65 6e 64 7b 66 75 6e |var{i}..|\end{fun|
|00000f00| 63 64 65 73 63 7d 22 3e | 0a 3c 42 52 3e 0a 0a 3c |cdesc}">|.<BR>..<|
|00000f10| 50 3e 0a 3c 42 52 3e 0a | 3c 49 4d 47 0a 20 20 53 |P>.<BR>.|<IMG. S|
|00000f20| 54 59 4c 45 3d 22 68 65 | 69 67 68 74 3a 20 32 2e |TYLE="he|ight: 2.|
|00000f30| 31 37 65 78 3b 20 76 65 | 72 74 69 63 61 6c 2d 61 |17ex; ve|rtical-a|
|00000f40| 6c 69 67 6e 3a 20 31 37 | 36 2e 35 35 65 78 3b 20 |lign: 17|6.55ex; |
|00000f50| 22 20 53 52 43 3d 22 69 | 6d 67 31 31 2e 70 6e 67 |" SRC="i|mg11.png|
|00000f60| 22 0a 20 41 4c 54 3d 22 | 5c 62 65 67 69 6e 7b 66 |". ALT="|\begin{f|
|00000f70| 75 6e 63 64 65 73 63 7d | 7b 74 6f 66 69 6c 65 7d |uncdesc}|{tofile}|
|00000f80| 7b 66 7d 0a 57 72 69 74 | 65 20 61 6c 6c 20 69 74 |{f}.Writ|e all it|
|00000f90| 65 6d 73 20 28 61 73 20 | 6d 61 63 68 69 6e 65 20 |ems (as |machine |
|00000fa0| 76 61 6c 75 65 73 29 20 | 74 6f 20 74 68 65 20 66 |values) |to the f|
|00000fb0| 69 6c 65 20 6f 62 6a 65 | 63 74 20 5c 76 61 72 7b |ile obje|ct \var{|
|00000fc0| 66 7d 2e 0a 5c 65 6e 64 | 7b 66 75 6e 63 64 65 73 |f}..\end|{funcdes|
|00000fd0| 63 7d 22 3e 0a 3c 42 52 | 3e 0a 0a 3c 50 3e 0a 3c |c}">.<BR|>..<P>.<|
|00000fe0| 42 52 3e 0a 3c 49 4d 47 | 0a 20 20 53 54 59 4c 45 |BR>.<IMG|. STYLE|
|00000ff0| 3d 22 68 65 69 67 68 74 | 3a 20 32 2e 33 38 65 78 |="height|: 2.38ex|
|00001000| 3b 20 76 65 72 74 69 63 | 61 6c 2d 61 6c 69 67 6e |; vertic|al-align|
|00001010| 3a 20 31 37 36 2e 34 30 | 65 78 3b 20 22 20 53 52 |: 176.40|ex; " SR|
|00001020| 43 3d 22 69 6d 67 31 32 | 2e 70 6e 67 22 0a 20 41 |C="img12|.png". A|
|00001030| 4c 54 3d 22 5c 62 65 67 | 69 6e 7b 66 75 6e 63 64 |LT="\beg|in{funcd|
|00001040| 65 73 63 7d 7b 74 6f 6c | 69 73 74 7d 7b 7d 0a 43 |esc}{tol|ist}{}.C|
|00001050| 6f 6e 76 65 72 74 20 74 | 68 65 20 61 72 72 61 79 |onvert t|he array|
|00001060| 20 74 6f 20 61 6e 20 6f | 72 64 69 6e 61 72 79 20 | to an o|rdinary |
|00001070| 6c 69 73 74 20 77 69 74 | 68 20 74 68 65 20 73 61 |list wit|h the sa|
|00001080| 6d 65 20 69 74 65 6d 73 | 2e 0a 5c 65 6e 64 7b 66 |me items|..\end{f|
|00001090| 75 6e 63 64 65 73 63 7d | 22 3e 0a 3c 42 52 3e 0a |uncdesc}|">.<BR>.|
|000010a0| 0a 3c 50 3e 0a 3c 42 52 | 3e 0a 3c 49 4d 47 0a 20 |.<P>.<BR|>.<IMG. |
|000010b0| 20 53 54 59 4c 45 3d 22 | 68 65 69 67 68 74 3a 20 | STYLE="|height: |
|000010c0| 32 2e 31 37 65 78 3b 20 | 76 65 72 74 69 63 61 6c |2.17ex; |vertical|
|000010d0| 2d 61 6c 69 67 6e 3a 20 | 31 37 36 2e 35 35 65 78 |-align: |176.55ex|
|000010e0| 3b 20 22 20 53 52 43 3d | 22 69 6d 67 31 33 2e 70 |; " SRC=|"img13.p|
|000010f0| 6e 67 22 0a 20 41 4c 54 | 3d 22 5c 62 65 67 69 6e |ng". ALT|="\begin|
|00001100| 7b 66 75 6e 63 64 65 73 | 63 7d 7b 74 6f 73 74 72 |{funcdes|c}{tostr|
|00001110| 69 6e 67 7d 7b 7d 0a 43 | 6f 6e 76 65 72 74 20 74 |ing}{}.C|onvert t|
|00001120| 68 65 20 61 72 72 61 79 | 20 74 6f 20 61 6e 20 61 |he array| to an a|
|00001130| 72 72 61 79 20 6f 66 20 | 6d 61 63 68 69 6e 65 20 |rray of |machine |
|00001140| 76 61 6c 75 65 73 20 61 | 6e 64 2e 2e 2e 0a 2e 2e |values a|nd......|
|00001150| 2e 73 20 74 68 61 74 20 | 77 6f 75 6c 64 0a 62 65 |.s that |would.be|
|00001160| 20 77 72 69 74 74 65 6e | 20 74 6f 20 61 20 66 69 | written| to a fi|
|00001170| 6c 65 20 62 79 20 74 68 | 65 20 5c 63 6f 64 65 7b |le by th|e \code{|
|00001180| 74 6f 66 69 6c 65 28 29 | 7d 20 6d 65 74 68 6f 64 |tofile()|} method|
|00001190| 2e 29 0a 5c 65 6e 64 7b | 66 75 6e 63 64 65 73 63 |.).\end{|funcdesc|
|000011a0| 7d 22 3e 0a 3c 42 52 3e | 0a 0a 3c 50 3e 0a 57 68 |}">.<BR>|..<P>.Wh|
|000011b0| 65 6e 20 61 6e 20 61 72 | 72 61 79 20 6f 62 6a 65 |en an ar|ray obje|
|000011c0| 63 74 20 69 73 20 70 72 | 69 6e 74 65 64 20 6f 72 |ct is pr|inted or|
|000011d0| 20 63 6f 6e 76 65 72 74 | 65 64 20 74 6f 20 61 20 | convert|ed to a |
|000011e0| 73 74 72 69 6e 67 2c 20 | 69 74 20 69 73 0a 72 65 |string, |it is.re|
|000011f0| 70 72 65 73 65 6e 74 65 | 64 20 61 73 20 61 72 72 |presente|d as arr|
|00001200| 61 79 28 74 79 70 65 63 | 6f 64 65 2c 20 69 6e 69 |ay(typec|ode, ini|
|00001210| 74 69 61 6c 69 7a 65 72 | 29 2e 20 20 54 68 65 0a |tializer|). The.|
|00001220| 69 6e 69 74 69 61 6c 69 | 7a 65 72 20 69 73 20 6f |initiali|zer is o|
|00001230| 6d 69 74 74 65 64 20 69 | 66 20 74 68 65 20 61 72 |mitted i|f the ar|
|00001240| 72 61 79 20 69 73 20 65 | 6d 70 74 79 2c 20 6f 74 |ray is e|mpty, ot|
|00001250| 68 65 72 77 69 73 65 20 | 69 74 20 69 73 20 61 0a |herwise |it is a.|
|00001260| 73 74 72 69 6e 67 20 69 | 66 20 74 68 65 20 74 79 |string i|f the ty|
|00001270| 70 65 63 6f 64 65 20 69 | 73 20 27 63 27 2c 20 6f |pecode i|s 'c', o|
|00001280| 74 68 65 72 77 69 73 65 | 20 69 74 20 69 73 20 61 |therwise| it is a|
|00001290| 20 6c 69 73 74 20 6f 66 | 0a 6e 75 6d 62 65 72 73 | list of|.numbers|
|000012a0| 2e 20 20 54 68 65 20 73 | 74 72 69 6e 67 20 69 73 |. The s|tring is|
|000012b0| 20 67 75 61 72 61 6e 74 | 65 65 64 20 74 6f 20 62 | guarant|eed to b|
|000012c0| 65 20 61 62 6c 65 20 74 | 6f 20 62 65 20 63 6f 6e |e able t|o be con|
|000012d0| 76 65 72 74 65 64 20 62 | 61 63 6b 20 74 6f 0a 61 |verted b|ack to.a|
|000012e0| 6e 20 61 72 72 61 79 20 | 77 69 74 68 20 74 68 65 |n array |with the|
|000012f0| 20 73 61 6d 65 20 74 79 | 70 65 20 61 6e 64 20 76 | same ty|pe and v|
|00001300| 61 6c 75 65 20 75 73 69 | 6e 67 20 72 65 76 65 72 |alue usi|ng rever|
|00001310| 73 65 20 71 75 6f 74 65 | 73 0a 28 60 60 29 2e 20 |se quote|s.(``). |
|00001320| 20 45 78 61 6d 70 6c 65 | 73 3a 0a 0a 3c 50 3e 0a | Example|s:..<P>.|
|00001330| 3c 50 52 45 3e 0a 61 72 | 72 61 79 28 27 6c 27 29 |<PRE>.ar|ray('l')|
|00001340| 0a 61 72 72 61 79 28 27 | 63 27 2c 20 27 68 65 6c |.array('|c', 'hel|
|00001350| 6c 6f 20 77 6f 72 6c 64 | 27 29 0a 61 72 72 61 79 |lo world|').array|
|00001360| 28 27 6c 27 2c 20 5b 31 | 2c 20 32 2c 20 33 2c 20 |('l', [1|, 2, 3, |
|00001370| 34 2c 20 35 5d 29 0a 61 | 72 72 61 79 28 27 64 27 |4, 5]).a|rray('d'|
|00001380| 2c 20 5b 31 2e 30 2c 20 | 32 2e 30 2c 20 33 2e 31 |, [1.0, |2.0, 3.1|
|00001390| 34 5d 29 0a 3c 2f 50 52 | 45 3e 0a 0a 3c 48 52 3e |4]).</PR|E>..<HR>|
|000013a0| 0a 0a 3c 2f 42 4f 44 59 | 3e 0a 3c 2f 48 54 4d 4c |..</BODY|>.</HTML|
|000013b0| 3e 0a | |>. | |
+--------+-------------------------+-------------------------+--------+--------+