Loops/Infinite: Difference between revisions

Added C3
m (→‎{{header|Tailspin}}: better style)
(Added C3)
Line 616:
std::cout << "SPAM\n";
while (true);</syntaxhighlight>
 
=={{header|C3}}==
<syntaxhighlight lang="c3">while(1) io::printn("SPAM");</syntaxhighlight>
or
<syntaxhighlight lang="c3">for(;;) io::printn("SPAM");</syntaxhighlight>
or
<syntaxhighlight lang="c3">do { io::printn("SPAM"); } while(1);</syntaxhighlight>
or
<syntaxhighlight lang="c3">switch (1)
{
case 1:
io::printn("SPAM");
nextcase 1;
}
</syntaxhighlight>
 
=={{header|Chapel}}==
38

edits