MathGroup Archive 2006

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

Search the Archive

Beginner--Programming Problem with "if"


Hello

I write my programms like this

For[i=1,1>5,i++,
  Code line 1;
  Code line 2;
  Code line 3
];

This works until I use If

is there any possibility to combine the code?

this doesn't work:
If[i==1,(
  True line 1;
  True line 2;
  True line 3
 ),(
  Else line 1;
  Else line 2;
  Else line 3
)]; 

Help me Please

Magnetom

Link to the forum page for this post:
http://www.mathematica-users.org/webMathematica/wiki/wiki.jsp?pageName=Special:Forum_ViewTopic&pid=9611#p9611
Posted through http://www.mathematica-users.org [[postId=9611]]



  • Prev by Date: Re: List Operations
  • Next by Date: Where do I put my own add-on packages?
  • Previous by thread: Re: Re: Problem with limiits
  • Next by thread: Re: Beginner--Programming Problem with "if"