44 lines
791 B
HTML
44 lines
791 B
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<title>Repeat statement</title>
|
|
<link href="style.css" rel="stylesheet" type="text/css">
|
|
</head>
|
|
<body background="images/back.gif">
|
|
<!--START-->
|
|
|
|
<h3>Repeat statement</h3>
|
|
|
|
A repeat statement has the form
|
|
|
|
<p>
|
|
<blockquote><pre><b>repeat</b> (<expression>) <statement>
|
|
</pre></blockquote>
|
|
|
|
<p>
|
|
The statement is repeated the number of times indicated by the rounded
|
|
value of the expression.
|
|
|
|
<p>
|
|
<b>Example</b><br>
|
|
|
|
The following program creates five balls at random positions.
|
|
|
|
<p>
|
|
<blockquote>
|
|
<pre>
|
|
{
|
|
<b>repeat</b> (5) instance_create(random(400),random(400),ball);
|
|
}
|
|
</pre>
|
|
</blockquote>
|
|
|
|
|
|
<!--END-->
|
|
</body>
|
|
</html>
|
|
|
|
<!-- KEYWORDS
|
|
repeat statement
|
|
--> |