From: Jim Weirich Date: 2005-02-14T04:25:06+09:00 Subject: Re: evaluation order On Sunday 13 February 2005 11:39 am, Robert Klemme wrote: > Note also, that assignment in a conditional really only makes sense for > loops. With "if" and "unless" it's totally superfluous since you can > always do > > a=x > if a then... I will occasionally use the a=x in an elsif statement. Generally when the 'x' part looks up something that I want to process in the elsif part. E.g. if parent.nil? handle_no_parent elsif children = parent.get_children do_somthing_with(children) else do_something_else end Probably a bad example, but you get my drift. -- -- Jim Weirich jim@weirichhouse.org http://onestepback.org ----------------------------------------------------------------- "Beware of bugs in the above code; I have only proved it correct, not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)