Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Text and multiple calculations in an IF condition

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100981] Re: Text and multiple calculations in an IF condition
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Fri, 19 Jun 2009 20:45:35 -0400 (EDT)
  • Organization: Uni Leipzig
  • References: <h1en44$i4q$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de

Hi,

do you mean:

If[a>b, (*Then*)
   do something here;
   and something else here;
   insert a text here,
(* Else *)
   do something;
   and more
]


? Have you not founs how to make a comment (* *) or have you not
found that If[] has a third argument (and a fourth) ?

Regards
   Jens

Pascal Schulthess wrote:
> Hi everybody,
> 
> I have a small problem, and haven't found any solution yet. So I hope you 
> can help me.
> 
> I'd like to have describing text, comments and multiple calculations when 
> one condition is true, and others when it's false.
> 
> For example:
> 
> If[a>b,
> 	do something here;
> 	and something else here;
> 	insert a text here;
> else
> 	do something;
> 	and more;
> ]
> 
> As far as I tried this is not possible with the if condition provided?!
> But I also think this quite easy to do, if you know how to.
> 
> Thanks for your help.
> 
> Pascal
> 


  • Prev by Date: BarChart and Ticks
  • Next by Date: Re: Text and multiple calculations in an IF condition
  • Previous by thread: Re: Text and multiple calculations in an IF condition
  • Next by thread: Re: Text and multiple calculations in an IF condition