This now works: var x = 2; var y = (x + 1 as k) + k; println$ y;
var a = (x + 1 as var q) + q; println$ a; var b = (var x + 1) + 2; println$ b; var c = (var b + 1); ++b; println$ c,b; The "as k" construction creates a new value which can be used in the expression (before or after definition!). var y = (x + 1 as k) + k; is equivalent to: val k = x + 1; var y = k + k; "as var" is the same except it creates a variable. Writing just: (var b + 1) create an anonymous variable. The primary intent of the latter construction is to ensure eager evaluation. -- john skaller skal...@users.sourceforge.net http://felix-lang.org ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language