Paul Brannan wrote: > On Fri, 22 Jun 2001, Tobin Baker wrote: > > > #Ruby > > baz = nil > > myFoo.bar {|baz|} > > p baz #=> 10 > ... > > Is this reasonable syntax, or is it just getting too ugly? > > One problem with this is that because you can't really get the values of > the "out" parameters in the block, you can't have inout parameters, as you > mentioned. What's worse, you must now divide your parameters into two > groups: in parameters and out parameters. While this might work fine for > RubyX11, it's not going to work well for CORBA. Perhaps I am missing something but why not use a InOut class: class InOut attr_accessor :value def initialize(value=nil) @value = value end end # generate n InOut objects def InOutFac(n) (1..n).collect {InOut.new} end # "declare" b and c b, c = InOutFac(2) c.value = 22 f(a, b, c, d) But probably that's not what you want. Regards, Michael -- Michael Neumann merlin.zwo InfoDesign GmbH http://www.merlin-zwo.de