Problem with case stmt alternatives


#1

Hi,

I posted my problem code on http://pastie.org/444466.

On lines 38-39 I have the code:
case colSymbol
when :Status || :Symbol || :TradeType || :Quantity || :Price

As colSymbol assumes various Symbols as values, only the first one
seems to match.
The || symbols don’t seem to work in this context.

Any ideas why not?

Thanks in Advance,
Richard


#2

On Apr 12, 2009, at 3:55 PM, RichardOnRails wrote:

On lines 38-39 I have the code:
case colSymbol
when :Status || :Symbol || :TradeType || :Quantity || :Price

As colSymbol assumes various Symbols as values, only the first one
seems to match.
The || symbols don’t seem to work in this context.

Any ideas why not?

Try:

when :Status, :Symbol, …

James Edward G. II


#3

On Apr 12, 5:01 pm, James G. removed_email_address@domain.invalid wrote:

Any ideas why not?

Try:

when :Status, :Symbol, …

James Edward G. II

Hey James,

You’re spot on!

Thank you very much.

Best wishes,
Richard