From: Rob Biedenharn Date: 2010-10-16T04:34:57+09:00 Subject: Re: Setting variable with either value On Oct 15, 2010, at 3:07 PM, Paul Bergstrom wrote: > Is there a better way to write this? > > @a = "abc" > > @a = @b if @b > > This will set value @a to @b if @b already have a value since > before. If > not it will use the default @a which is "abc". If I understand you, this will do that: @a = @b || "abc" -Rob Rob Biedenharn Rob@AgileConsultingLLC.com http://AgileConsultingLLC.com/ rab@GaslightSoftware.com http://GaslightSoftware.com/