Hi all, Could someone tell me whether this is a bug in YCP or if I am misunderstanding the documentation, it is certainly counter-intuitive. The documentation (http://forgeftp.novell.com//yast/doc/SL10.2/tdg/id_ycp_return.html) states: The return statement immediately leaves the current function or a current top level block (that contains it) and optionally assigns a return_value to this block. If blocks are nested, i.e. if the current block is contained in another block, the return statement leaves all nested blocks and defines the value of the outermost block. Therefore I would expect the following programme to print "One" "Two" "Three". However, it actually prints "One" "One" "Three". { string One() { return "One"; } string Two() { string value = "One"; foreach(string str, ["Two"], { return str; }); return value; } string Three() { string value = "One"; foreach(string str, ["Three"], { value = str; }); return value; } y2milestone(One()); y2milestone(Two()); y2milestone(Three()); } _ Benjamin Weber -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org