You can now do:
///////////////////////////
#import <flx.flxh>
ctor int (x:string){ return atoi x; }
var a = int "123"; println a;
ctor long (x:string)=> long (int x);
var b = long "123"; println b;
ctor float : string = "(float)std::atof($1.data())" requires cstdlib;
var c = float "1.23"; println c;
//////////////////////
ctor int just means the same as fun _ctor_int, except that
the syntax is cleaner and the return type is enforced.
--
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Felix-language mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/felix-language