Re: How to tell Mathematica to stop conditional testing in an If statment if one condition is niether True or False? McCarthy evaluation rules? 'and then' test?
- To: mathgroup at smc.vnet.net
- Subject: [mg69585] Re: How to tell Mathematica to stop conditional testing in an If statment if one condition is niether True or False? McCarthy evaluation rules? 'and then' test?
- From: Oliver Friedrich <xoliver.friedrich at tzm.dex>
- Date: Sat, 16 Sep 2006 03:50:26 -0400 (EDT)
- References: <eebfu3$5dt$1@smc.vnet.net>
"Nasser Abbasi" <nma at 12000.org> wrote in news:eebfu3$5dt$1 @smc.vnet.net: > I can better describe this with simple example: > > ------------- code ------------ > > Remove["Global`*"]; > xc = Table[i, {i, 1, 3}] > x = 5; > If[x == b && xc[[10]] == 4, Print["True"], Print ["False"], > Print["Can't decide"]] > Hallo Nasser, you could nest two If[] expressions like this: If[x==b, If[xc[[10]]==4, Print["True"], Print["False"], Print"Can't decide"]], Print["False"], Print["Can't decide"]] Regards Oli -- Regards Oliver Friedrich My email has no x!