K,
the advantage of SELECT CASE constructs is that it processes the first TRUE statement and then 'exits' itself (To catch exceptions one can add a default case 1 statement)... sample :
$x = 1
select
case $x > 0
'$$x is greater than 0' ?
case $x = 1
'$$x equals one' ?
case 1
'Nothing of the above' ?
endselect
this will print '$x is greater than 0' to the screen !
So sometimes this is a good thing , but if you like to have several things done on several cases a nested if else endif construct helps more
As well you can patch several conditions to be evaluated together with a combination of AND OR NOT Operators :
'simple' sample :
if ingroup("Group1") or ingroup("Group2") and not ingroup("Group3")
;True if in Group1 or in Group2, but not in Group3
;do something
else
;do something else
endif
; also you can change evalutaion adding some brackets :
if ingroup("Group1") or (ingroup("Group2") and not ingroup("Group3"))
;True if in Group1 no matter what else
;do something
else
;do something else
endif
Hope this helps
Jochen
[ 19. February 2003, 16:09: Message edited by: jpols ]
_________________________