From: Karl-Heinz Wild Date: 2005-10-12T15:31:23+09:00 Subject: Re: Default argument values for blocks On 12.10.2005, at 08:15, Christophe Grandsire wrote: > Selon Karl-Heinz Wild : > >>> >>> foo {|a; b, c| ...} # b and c are block local >>> >> >> and how I whould have to write that c is global? >> >> foo { | a,b, global c | } >> foo { | a, b, | } >> >> Please don't misunderstand my suggestion. >> I have no idea if it's possible or not, >> but it looks pretty to me :) > > If I understood the discussion correctly, you *don't* have to write > anything if > you want c not to be block local. The planned new behaviour of > blocks is that > local variables defined in them will be local to the whole scope, > not the block > itself only, *unless* you indicate them explicitly through the > syntax above. So > there's no need to indicate globality. You are right. I've overseen that. My intention wasn't to change the planned new behaviour, only thinking about the syntax. > And now someone is probably going to come and say I made a complete > fool of > myself and didn't understand what is going on ;) (in other words, > take this > with a huge AFAIK in front of it). But really, I'm not shy to be what I am. Maybe - sometime a fool :) regards Karl-Heinz