Javeed Sar wrote at Wed, 28 Aug 2002 07:38:14 +0200:
> if (($vbpcount==1) ||($dspcount==1))
> { die "\n\nThe element ($PN) is not allowed to be added to
> ClearCase,Because a project already exists.\n";
> }
>
> elsif(($vbpcount==1) && ($dspcount==1))
> {die "\n\nThe element ($PN) is not allowed to be added to ClearCase,Because
> a project already exists.\n";
> }
>
> Can i combine both this conditional statements into one single statement?
> Because my die statements for both conditions is same.
As the others already told, the elsif statement isn't necessary.
However, I could imagine,
that you only need to test,
whether there is a vbp or a dsp counted.
In that case, a simple way to express it is
if ($vbpcount or $dspcount) {
die "...";
}
# or written as expectation instead of a condition:
# No counting of vbps, none of dsps, otherwise die ...
!$vbpcount && !$dspcount or die "....";
# or
die " ... " if $vbpcount || $dspcount;
Cheerio,
Janek
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]