exiting a void loop() statement

Is there any way to exit a void loop() structure? Is the only way to stop the loop() command to put in the code some type of button pushing on the Arduino board? I would like to have the loop command go through a set number of interations and then stop -- without having to push any buttons on the board. Is this possible? If I put in the "break" command, the program won't compile correctly. If I omit the loop command, and just use a "for" statement, nothing happens when the program executes. I'm using the Arduino code to control a robot's motors. Please help --Clueless in the Cloud

(deleted)

I was going to suggest waiting for a button-peck.

You have to have a loop() function, but it doesn't have to have anything in it. So put everything in setup(), and have an empty loop().

void setup()
{
  // Your code here
}

void loop()
{
}

And I'd suggest at least blinking the LED so the OP knows the thing is still running.

Thanks for all your instructions. Now I can finally get out of an endless loop!

–Dexter7