[Gridflow-cvs] [svn] commit: r6834 - /trunk/src/classes2.cxx

svn-gridflow at artengine.ca svn-gridflow at artengine.ca
Sun Nov 20 19:34:38 EST 2011


Author: matju
Date: Sun Nov 20 19:34:38 2011
New Revision: 6834

Log:
add [gf/strtof]

Modified:
    trunk/src/classes2.cxx

Modified: trunk/src/classes2.cxx
==============================================================================
--- trunk/src/classes2.cxx (original)
+++ trunk/src/classes2.cxx Sun Nov 20 19:34:38 2011
@@ -1174,6 +1174,15 @@
 };
 \end class {install("gf/class_info",1,1);}
 
+\class Strtof { // test for jwilkes
+  \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("gf/strtof",1,2);}
+
 void startup_classes2 () {
 	\startall
 }



More information about the Gridflow-cvs mailing list