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
|
#N canvas 252 0 527 607 12;
#X text 329 575 updated for Pd version 0.32;
#X text 19 512 see also:;
#X obj 21 10 pointer;
#X text 86 10 -- remember the location of a scalar in a list;
#N canvas 164 72 425 146 help-pointer-template1 0;
#X obj 60 21 template float x float y float z;
#X obj 18 81 filledpolygon z 0 1 0 0 20 0 20 30 0 30;
#X restore 328 325 pd help-pointer-template1;
#N canvas 10 274 449 150 help-pointer-template2 0;
#X obj 60 21 template float x float y;
#X obj 52 78 filledcurve 909 0 0 0 0 30 30 60 0 30 -30 0 0;
#X restore 328 348 pd help-pointer-template2;
#X obj 128 558 template;
#X obj 22 532 get;
#X obj 51 532 set;
#X obj 77 532 append;
#X obj 124 532 getsize;
#X obj 178 532 setsize;
#X obj 233 532 element;
#X obj 22 557 sublist;
#X obj 77 558 scalar;
#N canvas 0 0 219 163 help-pointer-data 1;
#X restore 328 303 pd help-pointer-data;
#N canvas 142 212 528 297 stuff 0;
#X obj 110 35 loadbang;
#X msg 110 57 bang;
#X obj 109 80 t b b b b;
#X obj 247 137 pointer;
#X msg 248 111 traverse pd-help-pointer-data \, bang;
#X obj 96 210 append help-pointer-template1 x y z;
#X obj 94 245 append help-pointer-template2 x y;
#X msg 236 65 \; pd-help-pointer-data clear;
#X msg 27 172 20 230;
#X msg 99 138 80 150 90 \, 120 250 9;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 8 0;
#X connect 2 1 9 0;
#X connect 2 2 4 0;
#X connect 2 3 7 0;
#X connect 3 0 5 3;
#X connect 3 0 6 2;
#X connect 4 0 3 0;
#X connect 8 0 6 0;
#X connect 9 0 5 0;
#X restore 437 372 pd stuff;
#X obj 54 293 pointer;
#X msg 54 214 traverse pd-help-pointer-data;
#X msg 67 238 bang;
#X text 109 239 outputs current value;
#X msg 69 264 next;
#X obj 54 318 print out1;
#X obj 135 311 print out2;
#X text 114 260 moves forward one item and outputs pointer \; if we reach the end \, a "bang" goes to out2.;
#X text 14 372 Optional arguments to pointer allow you to select according to the class of the scalar being output:;
#X msg 73 426 next;
#X msg 59 403 traverse pd-help-pointer-data;
#X obj 59 450 pointer help-pointer-template1 help-pointer-template2;
#X obj 59 481 print template1;
#X obj 181 481 print template2;
#X obj 303 481 print other;
#X obj 390 481 print bangout;
#X text 266 214 sets to the "head" of the list;
#X text 29 34 "Pointer" is a storage object like "float" \, except that the thing stored is the location of a scalar somewhere. You can send a pointer a value (perhaps from another "pointer" object). The right inlet takes pointers and simply stores them. A bang in the left outputs the pointer \, and a pointer in the left both sets and outputs the value.;
#X text 29 115 The value of a pointer can either indicate a real scalar \, or else the "head" (before the first element) of the list. This allows you to point to an empty list \, and also \, to "append" a scalar to the beginning of the list.;
#X text 29 174 Pointers are "safe": if you delete a scalar pointers to it are marked invalid.;
#X text 145 328 bang at end;
#X text 146 344 of list;
#X text 53 338 output;
#X connect 17 0 22 0;
#X connect 17 1 23 0;
#X connect 18 0 17 0;
#X connect 19 0 17 0;
#X connect 21 0 17 0;
#X connect 26 0 28 0;
#X connect 27 0 28 0;
#X connect 28 0 29 0;
#X connect 28 1 30 0;
#X connect 28 2 31 0;
#X connect 28 3 32 0;
|