#N canvas 399 46 562 544 10;
#X obj 3 335 cnv 3 550 3 empty empty inlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 3 396 cnv 3 550 3 empty empty outlets 8 12 0 13 #dcdcdc #000000 0;
#X obj 3 429 cnv 3 550 3 empty empty arguments 8 12 0 13 #dcdcdc #000000 0;
#X obj 75 342 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 75 405 cnv 17 3 17 empty empty 0 5 9 0 16 #dcdcdc #9c9c9c 0;
#X obj 71 216 print;
#X obj 312 220 print;
#X obj 3 515 cnv 15 552 21 empty empty empty 20 12 0 14 #e0e0e0 #202020 0;
#X text 173 437 -;
#X text 115 405 anything;
#X text 172 405 - the formatted message;
#X obj 41 151 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X text 139 343 bang;
#X text 115 366 anything;
#X text 172 365 -;
#X text 96 462 2) anything;
#X text 108 437 1) symbol;
#X text 173 462 -;
#X text 185 437 the optional 'symout' argument formats a symbol message ('symout' itself not included), f 57;
#X msg 218 154 wind;
#X msg 71 150 wood;
#X obj 281 153 bng 15 250 50 0 empty empty empty 17 7 0 10 #dcdcdc #000000 #000000;
#X msg 312 152 64 64;
#X obj 312 184 cyclone/sprintf char number %d is '%c';
#X msg 376 155 \$1 \$1;
#X obj 71 180 cyclone/sprintf %s-%s.wav;
#X obj 376 128 nbx 3 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X text 172 343 - formats the message with current input, f 59;
#X obj 75 364 cnv 17 3 27 empty empty 0-n 5 9 0 16 #dcdcdc #9c9c9c 0;
#N canvas 777 115 489 472 possible-types 0;
#X text 91 46 %c;
#X text 112 46 character, f 49;
#X text 55 59 %d or %i;
#X text 91 98 %e;
#X text 91 111 %E;
#X text 91 150 %o;
#X text 91 163 %s;
#X text 91 176 %u;
#X text 112 176 unsigned integer, f 49;
#X text 91 189 %x;
#X text 112 189 unsigned hexadecimal in lowercase, f 49;
#X text 91 202 %X;
#X text 112 202 unsigned hexadecimal in CAPS, f 49;
#X text 112 150 unsigned octal, f 49;
#X text 112 163 string, f 49;
#X text 91 124 %g;
#X text 91 137 %G;
#X text 91 85 %F;
#X text 91 72 %f;
#X obj 72 302 pdcontrol;
#X msg 72 273 browse https://en.wikipedia.org/wiki/Printf_format_string;
#X text 57 19 Possible types in [sprintf], f 30;
#X text 112 59 signed decimal intege, f 49;
#X text 112 72 float (lowercase for 'nan'/'inf'), f 49;
#X text 112 85 float (uppercase for 'NAN'/'INF'), f 49;
#X text 112 98 float in exponential notation using "e" character;
#X text 112 111 float in exponential notation using "E" character;
#X text 112 124 float in normal (%f) or exponential (%e), f 49;
#X text 112 137 float in normal (%F) or exponential (%E), f 49;
#X text 93 243 For more details on these types \, refer to a standard C library manual. For instance in the link below:, f 52;
#X obj 72 248 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X text 156 305 The above reference has more information and parameters not really available for [sprintf]. Nonetheless \, the optional fields: "+" \, "#" \, the width and precision field are supported. Only the single modifiers "h" and "l" are allowed., f 46;
#X text 59 382 Inconsistency: If a format type is not supported or invalid \, [sprintf] doesn't create a corresponding inlet and prints an error isntead. The Max version creates an inlet for whatever inserted type \, invalid or not \, and only prints an error when trying to convert.;
#X connect 20 0 19 0;
#X connect 30 0 20 0;
#X restore 326 491 pd possible-types;
#N canvas 554 133 767 604 examples 0;
#X obj 61 276 print;
#X obj 61 181 nbx 5 14 -1e+37 1e+37 0 0 empty empty empty 0 -8 0 10 #dcdcdc #000000 #000000 0 256;
#X obj 61 458 print;
#X msg 61 392 error;
#X obj 240 424 cyclone/sprintf it's %s;
#X msg 240 392 OK!;
#X obj 240 458 print;
#X text 42 144 Examples with float:;
#X obj 61 424 cyclone/sprintf %d;
#X text 34 320 A symbol may be received in any inlet that corresponds to a %s argument. If sent to another inlet type \, a conversion error is given in Pd's window.;
#X msg 523 310 a;
#X floatatom 598 310 5 0 0 0 - - - 0;
#X symbolatom 523 425 10 0 0 0 - - - 0;
#X symbolatom 640 426 10 0 0 0 - - - 0;
#X obj 523 398 unpack symbol symbol;
#X obj 523 335 cyclone/bondo;
#X obj 523 361 cyclone/sprintf list %s\ symbol %d\ int, f 20;
#X text 433 40 The optional 'symout' argument turns the whole output into a symbol message \, which is useful for format strings with spaces \, commas and other special characters., f 48;
#X symbolatom 479 168 10 0 0 0 - - - 0;
#X msg 479 112 a;
#X obj 479 142 cyclone/sprintf symout %s symbol, f 34;
#X obj 479 197 print;
#X symbolatom 468 310 7 0 0 0 - - - 0;
#X text 41 26 The arguments in [sprintf] format a message to be sent out and can be floats \, symbols or changeable arguments (like %i for integers \, %f for floats and %s for symbol strings) resembling the C programming language). The number of changeable arguments determines the number of inlets \, with each inlet corresponding to a changeable argument \, in order.;
#X text 41 93 If a changeable number argument argument (such as %i or %f) does not receive an input \, the default value is "0". If no value has been received for a changeable symbol argument (%s or %c) \, a blank space is the default.;
#X obj 61 246 cyclone/sprintf %.2fdB a-%i%%;
#X text 252 248 %% becomes %;
#X text 174 265 %%%% becomes %% and so on;
#X msg 340 500 is;
#X obj 340 560 print;
#X msg 205 184 10.6;
#X text 241 183 (truncated to int);
#X floatatom 167 184 5 0 0 0 - - - 0;
#X obj 205 216 t b f;
#X text 172 513 Messages with more than one item spored items to the next inlets, f 25;
#X obj 340 527 cyclone/sprintf this %s %s %s;
#X msg 425 500 quite alright;
#X text 452 241 Nonetheless \, note you can use backslashes to create symbols with special characters such as spaces., f 42;
#X connect 1 0 25 0;
#X connect 3 0 8 0;
#X connect 4 0 6 0;
#X connect 5 0 4 0;
#X connect 8 0 2 0;
#X connect 10 0 15 0;
#X connect 11 0 15 1;
#X connect 14 0 12 0;
#X connect 14 1 13 0;
#X connect 15 0 16 0;
#X connect 15 1 16 1;
#X connect 16 0 14 0;
#X connect 18 0 21 0;
#X connect 19 0 20 0;
#X connect 20 0 18 0;
#X connect 22 0 15 0;
#X connect 25 0 0 0;
#X connect 28 0 35 0;
#X connect 30 0 33 0;
#X connect 32 0 33 0;
#X connect 33 0 25 0;
#X connect 33 1 25 1;
#X connect 35 0 29 0;
#X connect 36 0 35 1;
#X restore 473 222 pd examples;
#X text 185 462 output message with format types '%' (each changeable argument creates a corresponding inlet). For all possible types and details \, see:;
#X text 184 365 float/symbol to match corresponding given type. Messages with more than one item spraed items to the next inlets.;
#X text 75 87 Based on C's "printf" function \, [sprintf] formats messages \, where each '%' format type corresponds to an inlet.;
#X obj 3 4 ./header sprintf;
#X text 23 63 Message formatter;
#X text 67 266 see also:;
#X obj 426 299 open-else;
#X text 478 270 click;
#X obj 59 288 makefilename;
#X msg 426 271 format;
#X text 153 279 Plugdata users or those with ELSE can also use [else/format] as a better alternative., f 42;
#X connect 11 0 25 0;
#X connect 19 0 25 1;
#X connect 20 0 25 0;
#X connect 21 0 23 0;
#X connect 22 0 23 0;
#X connect 23 0 6 0;
#X connect 24 0 23 0;
#X connect 25 0 5 0;
#X connect 26 0 24 0;
#X connect 40 0 37 0;
