2 USING: help.syntax help.markup byte-arrays alien.c-types ;
\r
4 ARTICLE: "c-arrays-factor" "Converting C arrays to and from Factor arrays"
\r
5 "Each primitive C type has a pair of words, " { $snippet ">" { $emphasis "type" } "-array" } " and " { $snippet { $emphasis "type" } "-array>" } ", for converting an array of Factor objects to and from a " { $link byte-array } " of C values. This set of words consists of:"
\r
6 { $subsection >c-bool-array }
\r
7 { $subsection >c-char-array }
\r
8 { $subsection >c-double-array }
\r
9 { $subsection >c-float-array }
\r
10 { $subsection >c-int-array }
\r
11 { $subsection >c-long-array }
\r
12 { $subsection >c-longlong-array }
\r
13 { $subsection >c-short-array }
\r
14 { $subsection >c-uchar-array }
\r
15 { $subsection >c-uint-array }
\r
16 { $subsection >c-ulong-array }
\r
17 { $subsection >c-ulonglong-array }
\r
18 { $subsection >c-ushort-array }
\r
19 { $subsection >c-void*-array }
\r
20 { $subsection c-bool-array> }
\r
21 { $subsection c-char-array> }
\r
22 { $subsection c-double-array> }
\r
23 { $subsection c-float-array> }
\r
24 { $subsection c-int-array> }
\r
25 { $subsection c-long-array> }
\r
26 { $subsection c-longlong-array> }
\r
27 { $subsection c-short-array> }
\r
28 { $subsection c-uchar-array> }
\r
29 { $subsection c-uint-array> }
\r
30 { $subsection c-ulong-array> }
\r
31 { $subsection c-ulonglong-array> }
\r
32 { $subsection c-ushort-array> }
\r
33 { $subsection c-void*-array> } ;
\r
35 ARTICLE: "c-arrays-get/set" "Reading and writing elements in C arrays"
\r
36 "Each C type has a pair of words, " { $snippet { $emphasis "type" } "-nth" } " and " { $snippet "set-" { $emphasis "type" } "-nth" } ", for reading and writing values of this type stored in an array. This set of words includes but is not limited to:"
\r
37 { $subsection char-nth }
\r
38 { $subsection set-char-nth }
\r
39 { $subsection uchar-nth }
\r
40 { $subsection set-uchar-nth }
\r
41 { $subsection short-nth }
\r
42 { $subsection set-short-nth }
\r
43 { $subsection ushort-nth }
\r
44 { $subsection set-ushort-nth }
\r
45 { $subsection int-nth }
\r
46 { $subsection set-int-nth }
\r
47 { $subsection uint-nth }
\r
48 { $subsection set-uint-nth }
\r
49 { $subsection long-nth }
\r
50 { $subsection set-long-nth }
\r
51 { $subsection ulong-nth }
\r
52 { $subsection set-ulong-nth }
\r
53 { $subsection longlong-nth }
\r
54 { $subsection set-longlong-nth }
\r
55 { $subsection ulonglong-nth }
\r
56 { $subsection set-ulonglong-nth }
\r
57 { $subsection float-nth }
\r
58 { $subsection set-float-nth }
\r
59 { $subsection double-nth }
\r
60 { $subsection set-double-nth }
\r
61 { $subsection void*-nth }
\r
62 { $subsection set-void*-nth } ;
\r
64 ARTICLE: "c-arrays" "C arrays"
\r
65 "C arrays are allocated in the same manner as other C data; see " { $link "c-byte-arrays" } " and " { $link "malloc" } "."
\r
67 "C type specifiers for array types are documented in " { $link "c-types-specs" } "."
\r
68 { $subsection "c-arrays-factor" }
\r
69 { $subsection "c-arrays-get/set" } ;
\r