aboutsummaryrefslogtreecommitdiff
path: root/sarray-help.pd
blob: 65040afe9ae035d8478bedce95b9a829f1dcec1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#N canvas 0 31 758 515 10;
#X obj 0 0 cnv 8 100 60 empty empty sarray 10 20 1 18 -262144 -1109
0;
#X text 2 467 (c) Moonix: Antoine Rousseau 2003;
#X msg 74 275 1;
#X msg 103 275 2;
#X msg 131 275 3;
#X symbolatom 139 356 10 0 0 0 - - -;
#X msg 533 269 reset;
#X text 109 12 shared array of symbols;
#X obj 47 146 sarray foo 8;
#X text 23 48 1) set the length;
#X msg 47 71 setlen 10;
#X text 236 43 2) set the nth element;
#X msg 266 85 set 2 two;
#X msg 274 106 set 3 three;
#X obj 258 169 sarray foo;
#X msg 129 110 print;
#X msg 44 299 get \$1;
#X obj 44 320 sarray foo;
#X obj 44 339 route bang;
#X msg 159 275 4;
#X obj 44 359 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X msg 44 275 0;
#X text 12 256 3) get the nth symbol (first:0);
#X obj 533 289 sarray foo;
#X text 1 376 (bang when empty);
#X text 298 252 4) dump the whole array;
#X obj 299 379 sarray foo;
#X msg 299 272 dump;
#X obj 299 400 print dump;
#X msg 334 325 dump _null_;
#X msg 334 345 dump *?!;
#X text 315 298 specify a default symbol;
#X text 329 309 for empty elements;
#X obj 472 175 sarray foo;
#X text 494 85 specify a default symbol;
#X text 494 97 for empty elements;
#X msg 294 147 print;
#X msg 428 146 print;
#X text 531 251 6) clear the sarray;
#X msg 578 269 print;
#X text 6 165 args: sarray name [length];
#X text 258 193 args: set [empty_symbol] first_index sym1 [sym2 [sym3...]]]
;
#X text 286 425 args: dump [empty_symbol];
#X msg 258 61 set 0 zero;
#X text 453 43 3) set many elements;
#X text 533 134 ...erase one element;
#X msg 281 127 set 4 four;
#X msg 57 93 setlen 4;
#X msg 534 149 set _niet_ 3 _niet_;
#X msg 499 113 set _ 0 zero un _ trois _ cinq;
#X msg 472 60 set 0 zero ein zwei drei;
#X text 528 328 7) switch to another array;
#X obj 523 370 sarray foo2 4;
#X msg 523 351 set 0 zero2 one2 two2 three2;
#X obj 528 442 sarray;
#X msg 528 402 print;
#X msg 577 403 setarray foo;
#X msg 577 422 setarray foo2;
#N canvas 501 307 494 344 META 0;
#X text 12 25 LICENSE GPL v2;
#X text 12 105 AUTHOR Antoine Rousseau;
#X text 12 125 HELP_PATCH_AUTHORS Antoine Rousseau. "pd meta" information
added by Jonathan Wilkes for Pd version 0.42.;
#X text 12 5 KEYWORDS control storage list_op;
#X text 12 45 DESCRIPTION shared array of symbols;
#X text 12 65 INLET_0 setlen set print get dump reset setarray;
#X text 12 85 OUTLET_0 symbol list;
#X restore 702 485 pd META;
#X connect 2 0 16 0;
#X connect 3 0 16 0;
#X connect 4 0 16 0;
#X connect 6 0 23 0;
#X connect 10 0 8 0;
#X connect 12 0 14 0;
#X connect 13 0 14 0;
#X connect 15 0 8 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
#X connect 18 0 20 0;
#X connect 18 1 5 0;
#X connect 19 0 16 0;
#X connect 21 0 16 0;
#X connect 26 0 28 0;
#X connect 27 0 26 0;
#X connect 29 0 26 0;
#X connect 30 0 26 0;
#X connect 36 0 14 0;
#X connect 37 0 33 0;
#X connect 39 0 23 0;
#X connect 43 0 14 0;
#X connect 46 0 14 0;
#X connect 47 0 8 0;
#X connect 48 0 33 0;
#X connect 49 0 33 0;
#X connect 50 0 33 0;
#X connect 53 0 52 0;
#X connect 55 0 54 0;
#X connect 56 0 54 0;
#X connect 57 0 54 0;