There's a gotch with "blocks" exposed when I found this failed: for var i in 0 to 10 do .. return 10l; .. done return 9;
because to protect the "i" variable I put the whole thing in a { .. block .. } The problem is a block is a just a procedure, which returns void, not int. To fix this for for loops I just dropped the block, and of course protection of the control variable (since I just edited so much to use this syntax I can't easily dump it now). The above cases causes a type error but this one doesn't: proc F() { .... { ... if blah do return done ... }; ... } it just returns from the block .. NOT from "F". What Felix does is CORRECT, what C does is rubbish .. but it's still a gotcha if you're used to C like code (which is who Felix was really designed for .. :) Take note. Blocks are procedures not which scope variables AND control (i.e. returns). -- john skaller skal...@users.sourceforge.net ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Felix-language mailing list Felix-language@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/felix-language