MathGroup Archive 2008

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

Search the Archive

Re: Instructions in for


Look up CompoundExpression !

Alejandra Lozada wrote:
> Hello Group,
> 
> ______________________________________________
> QUESTION: how to introduce many instructions in for?
> ______________________________________________
> 
> 
> In C++ it is possible to use while/for and
> include many instructions:
> 
> for( i=0; i<n; i++ ){
>     instructions,
>     as many as you
>     like }
> 
> In Mathematica, one instruction (Print)  :
> 
> For[ i=1, i<n, i++, Print[i] ]
> how can I include more instructions?

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Re: Notations and Symbols
  • Next by Date: Re: Instructions in for
  • Previous by thread: Re: Instructions in for
  • Next by thread: Re: Instructions in for