From: "Peña, Botp" Date: 2007-10-17T10:46:07+09:00 Subject: Re: Compound conditionals in case when statements? Syntax? From: Randy Kramer [mailto:rhkramer@gmail.com] # Subject: Compound conditionals in case when statements? Syntax? # # I need (or want ;-) to do something like the following: # when ((/^---\+\+ (.*)/) and (new_record == true)) cases come in two forms, 1 classic switch form, like case sw when foo #.. when bar #.. else #.. end this form is interpreted using if is like (as already explained by mentalguy), if foo===sw #.. elsif bar===sw #.. else #.. end 2 conditional form (similar to nested ifs), like case when foo #... when bar and condition1 #... when condition2 or condition3 #.. else #.. end this form is interpreted using if like, if foo #.. elsif bar and condition1 #.. elsif condition2 or condition3 #.. else #.. end I would reckon fr your post that you may want the second form. So something like, case when ((/^---\+\+ (.*)/) and new_record #.. end But i'm not totally sure since you didn't post any sample code. but hey, if your code does not fit the cases, then by all means, do the ifs.. hth. kind regards -botp