Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Re: How to set up "Do" or "While" loops for several seperate commands

  • To: mathgroup at smc.vnet.net
  • Subject: [mg66325] Re: How to set up "Do" or "While" loops for several seperate commands
  • From: "ben" <benjamin.friedrich at gmail.com>
  • Date: Tue, 9 May 2006 03:50:07 -0400 (EDT)
  • References: <e3peic$ig3$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi Diana,

write all your commands in a single cell,
but separate them by a semicolon ';'

x = 1;

Do[
x += 1;
 Print[x],
{i, 10}]

Bye Ben


Diana Mecum schrieb:

> Hello math friends,
>
> I have written a program to calculate the (k-m)-rank of a partition. It
> involves repeating 7+ lines of code 77 times. I understand how to set
> up "Do" and "While" loop commands for a single, complex command, but
> don't understand how to do it for 7+ seperate lines of code.
>
> Can someone explain? I would be happy to foward the program, if you
> would like it.
> 
> Thanks,
> 
> Diana Mecum


  • Prev by Date: Re: 3D surface plotting
  • Next by Date: Re: )
  • Previous by thread: How to set up "Do" or "While" loops for several seperate commands
  • Next by thread: ODBC link in Mathematica