var y = 1; fun x => y; println$ "Hello World " + str x; ++y; println$ "Hello World " + str x; proc f(ref a:int) { println$ a; }
f &y; proc h { println "hi"; } h; /////// The fun x => y thingo is a functional variable. This is just like a function accepting a unit, except you don't need to apply it. The procedure f is accepting a reference argument. This is just a pointer to the given type, except within the body of the procedure you don't need to dereference it. You must *pass* a pointer to the procedure however. And h has no arguments so you can omit the () in the definition. Of course as usually you can also omit the () in the call. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language