[PD] symbol2list leading zero

Mathieu Bouchard matju at artengine.ca
Tue Nov 8 15:19:31 CET 2011

Le 2011-11-03 à 13:43:00, Jonathan Wilkes a écrit :

> I've written Pd Vanilla hacks that do it without writing to disk and 
> posted them on the list.  But I'm talking about GF solutions.

I don't remember a GF external for doing this, but if you want one, you 
can add the following external to a GF source file (before the \startall) 
and recompile :

\class Strtof {
   \constructor () {}
   \decl 0 symbol (const char *s) {
     char *e; float f=strtof(s,&e);
     if (e==s+strlen(s)) out[0](f); else out[1]();
\end class {install("strtof",1,2);}

Or I could make it part of GridFlow.

It outputs the float on the left if the symbol was fully parsed, or bang 
on the right otherwise.

| Mathieu BOUCHARD ----- téléphone : +1.514.383.3801 ----- Montréal, QC

More information about the Pd-list mailing list