#N struct template5 float x float y float z float q array bazoo template5-element
;
#N struct template5-element float y;
#N canvas 424 19 448 473 10;
#X obj 165 343 pointer;
#X floatatom 106 168 0 0 0 0 - - -;
#X msg 165 320 bang;
#X floatatom 147 270 0 0 0 0 - - -;
#X floatatom 12 300 0 0 0 0 - - -;
#X floatatom 165 389 0 0 0 0 - - -;
#X floatatom 298 293 0 0 0 0 - - -;
#X obj 298 246 pointer;
#X obj 282 163 pointer;
#X msg 298 221 bang;
#N canvas 454 37 332 220 data5 1;
#X scalar template5 50 75 30 9 \; 0 \; 0 \; 0 \; 0 \; 0 \; 3 \; 0 \;
0 \; 0 \; 7 \; -30 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \;
0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0
\; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 0 \; 43 \; 0 \;
0 \; 0 \; 0 \; \;;
#X restore 315 344 pd data5;
#N canvas 191 327 428 260 template5 0;
#X obj 24 125 filledpolygon 244 q 3 0 0 20 z 40 0;
#X text 22 78 this declares an array named "bazoo" whose elements are
described by "template5-element." Array declarations take three arguments
while "float" declarations take only two.;
#X text 22 170 Here we ask to plot the array \, color 700 \, line width
3 \, starting location (30 \, 10) relative to the scalar \, points
spaced 4 apart.;
#X text 23 220 You can also do (x \, y) plots and/or make the line
thickness variable---see the help window for "plot".;
#X obj 22 42 struct template5 float x float y float z float q array
bazoo template5-element;
#X obj 24 147 plot bazoo 700 3 30 40 4;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 Data Structure Template;
#X restore 315 367 pd template5;
#N canvas 65 248 428 149 template5-element 0;
#X text 19 66 This says that array elements will have a single floating-point
number named "y". The variable name "y" is automatically assumed to
control screen height \; if you don't have at least that variable you
can't plot the array..;
#X obj 22 42 struct template5-element float y;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 Data Structure Template;
#X restore 315 390 pd template5-element;
#X msg 282 140 traverse pd-data5 \, next;
#X obj 298 269 getsize template5 bazoo;
#X obj 106 190 setsize template5 bazoo;
#X obj 12 323 set template5-element y;
#X obj 165 366 get template5-element y;
#X obj 147 293 element template5 bazoo;
#X text 19 37 Scalars may contain arrays \, and moreover the elements
of an array can be of any scalar type (and can have sub-arrays recursively.)
The type of the element of an array is fixed in the template. In this
case \, "template5" contains the definition of the top-level scalar
and "template5-element" is the template of each array element (see
the template subpatch.);
#X text 292 121 click to get pointer;
#X text 298 201 get size;
#X text 94 148 set size;
#X text 144 218 select an individual;
#X text 144 233 element \, which is a;
#X text 144 248 scalar with template;
#X text 210 264 template5;
#X text 12 360 work as before \, but on;
#X text 12 375 array elements...;
#X text 12 345 normal "set" amd "get";
#X obj 1 1 cnv 15 445 20 empty \$0-pddp.cnv.header arrays_in_data_structures
20 10 1 18 -261139 -33289 0;
#X obj 407 2 pddp/pddplink http://puredata.info/dev/pddp -text pddp
;
#X obj 1 451 cnv 15 445 20 empty \$0-pddp.cnv.footer empty 20 12 0
14 -233017 -33289 0;
#N canvas 44 246 494 284 META 0;
#X text 12 125 WEBSITE http://crca.ucsd.edu/~msp/;
#X text 12 105 AUTHOR Miller Puckette;
#X text 12 85 LIBRARY PDDP;
#X text 12 5 GENRE tutorial;
#X text 12 45 LICENSE SIBSD;
#X text 12 145 HELP_PATCH_AUTHORS Updated for release 0.35. Jonathan
Wilkes revised the patch to conform to the PDDP template for Pd version
0.42.;
#X text 12 25 KEYWORDS data_structure;
#X text 12 65 DESCRIPTION arrays in data structures;
#X restore 392 453 pd META;
#N canvas 9 256 428 190 References 0;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 Arrays in Data Structures- Related Help Documents;
#X text 19 37 Links:;
#X restore 103 453 pd References;
#X obj 6 453 pddp/pddplink ../5.reference/pddp/help.pd -text help;
#N canvas 99 170 428 429 init 0;
#X obj 163 180 pointer;
#X obj 22 91 t b b b;
#X msg 22 66 bang;
#X text 56 66 click here to re-initialize;
#X obj 22 202 append template5 x y z q;
#X msg 163 117 \; pd-data5 clear;
#X msg 163 157 traverse pd-data5 \, bang;
#X msg 41 246 50;
#X obj 41 268 setsize template5 bazoo;
#X obj 22 42 loadbang;
#X obj 22 224 t b b p;
#X floatatom 55 341 0 0 0 0 - - -;
#X floatatom 22 341 0 0 0 0 - - -;
#X obj 22 392 set template5-element y;
#X obj 55 364 element template5 bazoo;
#X obj 22 317 unpack;
#X msg 22 295 3 5 \, 7 9 \, -30 10 \, 43 45;
#X obj 1 1 cnv 15 425 20 empty \$0-pddp.cnv.subheading empty 3 12 0
14 -261139 -33289 0;
#X text 7 2 Data Structure Initialization;
#X msg 22 180 50 75 30 9;
#X connect 0 0 4 4;
#X connect 1 0 19 0;
#X connect 1 1 6 0;
#X connect 1 2 5 0;
#X connect 2 0 1 0;
#X connect 4 0 10 0;
#X connect 6 0 0 0;
#X connect 7 0 8 0;
#X connect 9 0 2 0;
#X connect 10 0 16 0;
#X connect 10 1 7 0;
#X connect 10 2 8 1;
#X connect 10 2 14 1;
#X connect 11 0 14 0;
#X connect 12 0 13 0;
#X connect 14 0 13 1;
#X connect 15 0 12 0;
#X connect 15 1 11 0;
#X connect 16 0 15 0;
#X connect 19 0 4 0;
#X restore 315 413 pd init;
#X connect 0 0 17 0;
#X connect 1 0 15 0;
#X connect 2 0 0 0;
#X connect 3 0 18 0;
#X connect 4 0 16 0;
#X connect 7 0 14 0;
#X connect 8 0 15 1;
#X connect 8 0 18 1;
#X connect 8 0 7 0;
#X connect 9 0 7 0;
#X connect 13 0 8 0;
#X connect 14 0 6 0;
#X connect 17 0 5 0;
#X connect 18 0 0 0;
#X connect 18 0 16 1;
