This commit is contained in:
Ingy döt Net 2013-04-10 21:29:02 -07:00
parent 764da6cbbb
commit db842d013d
19005 changed files with 197040 additions and 7 deletions

View file

@ -0,0 +1 @@
Specifically print out "SPAM" followed by a newline in an infinite loop.

View file

@ -0,0 +1,2 @@
---
note: Iteration

View file

@ -0,0 +1,4 @@
@echo off
do forever
echo SPAM
enddo

View file

@ -0,0 +1,9 @@
InfiniteLoop LDX #0
PrintLoop: LDA MSG,x
JSR PrintAccumulator ;routine not implemented
INX
CPX #5
BNE PrintLoop
BEQ InfiniteLoop
MSG .byte "SPAM", $0A

View file

@ -0,0 +1,6 @@
(defun spam ()
(declare (xargs :mode :program))
(if nil
nil
(prog2$ (cw "SPAM~%")
(spam))))

View file

@ -0,0 +1,3 @@
DO
printf($"SPAM"l$)
OD

View file

@ -0,0 +1,3 @@
loop x:
printf($"SPAM"l$);
loop x

View file

@ -0,0 +1,5 @@
BEGIN {
while(1) {
print "SPAM"
}
}

View file

@ -0,0 +1,3 @@
while (true) {
trace("SPAM");
}

View file

@ -0,0 +1,3 @@
loop
Put_Line("SPAM");
end loop;

View file

@ -0,0 +1,3 @@
while (1) {
o_text("SPAM\n");
}

View file

@ -0,0 +1,5 @@
PROC main()
LOOP
WriteF('SPAM')
ENDLOOP
ENDPROC

View file

@ -0,0 +1,3 @@
repeat
log "SPAM"
end repeat

View file

@ -0,0 +1,2 @@
Loop
MsgBox SPAM `n

View file

@ -0,0 +1,3 @@
while 1
print "SPAM"
wend

View file

@ -0,0 +1,3 @@
do
print "SPAM"
loop

View file

@ -0,0 +1,3 @@
for i = 1 to 10 step 0
print "SPAM"
next i

View file

@ -0,0 +1,3 @@
REPEAT
PRINT "SPAM"
UNTIL FALSE

View file

@ -0,0 +1,4 @@
@echo off
:loop
echo SPAM
goto loop

View file

@ -0,0 +1 @@
for /l %%x in (1,0,2) do @echo SPAM

View file

@ -0,0 +1 @@
55+"MAPS",,,,,

View file

@ -0,0 +1,2 @@
++++++++++[->++++++>++++++++>+<<<]>+++++>
[+++.---.<.>---.+++>.<]

View file

@ -0,0 +1 @@
loop { p "SPAM" }

View file

@ -0,0 +1,2 @@
while (true)
std::cout << "SPAM" << std::endl;

View file

@ -0,0 +1,2 @@
for (;;)
std::cout << "SPAM" << std::endl;

View file

@ -0,0 +1,3 @@
do
std::cout << "SPAM" << std::endl;
while (true);

View file

@ -0,0 +1 @@
while(1) puts("SPAM");

View file

@ -0,0 +1 @@
for(;;) puts("SPAM");

View file

@ -0,0 +1 @@
do { puts("SPAM"); } while(1);

View file

@ -0,0 +1 @@
while(puts("SPAM"));

View file

@ -0,0 +1 @@
(loop [] (println "SPAM") (recur))

View file

@ -0,0 +1,2 @@
loop
console.log 'SPAM'

View file

@ -0,0 +1,3 @@
<cfloop condition = "true NEQ false">
SPAM
</cfloop>

View file

@ -0,0 +1,6 @@
<cfscript>
while( true != false )
{
writeOutput( "SPAM" );
}
</cfscript>

View file

@ -0,0 +1 @@
(loop (write-line "SPAM"))

View file

@ -0,0 +1,6 @@
import std.stdio;
void main() {
while (true)
writeln("SPAM");
}

View file

@ -0,0 +1,7 @@
import std.stdio;
void main() {
do
writeln("SPAM");
while (true);
}

View file

@ -0,0 +1,6 @@
import std.stdio;
void main() {
for ( ; ; )
writeln("SPAM");
}

View file

@ -0,0 +1,7 @@
import std.stdio;
void main() {
LOOP:
writeln("SPAM");
goto LOOP;
}

View file

@ -0,0 +1,2 @@
while True do
PrintLn('SPAM');

View file

@ -0,0 +1,2 @@
while True:
print "SPAM"

View file

@ -0,0 +1,4 @@
labda:
print "SPAM"
recurse
call

View file

@ -0,0 +1 @@
while True do Writeln('SPAM');

View file

@ -0,0 +1,3 @@
while (true) {
println("SPAM")
}

View file

@ -0,0 +1,5 @@
def f() {
println("SPAM")
f <- ()
}
f <- ()

View file

@ -0,0 +1,3 @@
open console
loop () = writen "SPAM" $ loop!

View file

@ -0,0 +1,5 @@
open console list
loop () = writen "SPAM" :: (& loop!)
take 10 <| loop! //prints SPAM only first 10 times

View file

@ -0,0 +1,6 @@
-module (main).
-export ([main/1]).
main(Any) ->
io:fwrite("SPAM~n",[]),
main(Any)

View file

@ -0,0 +1,3 @@
while 1 do
puts(1, "SPAM\n")
end while

View file

@ -0,0 +1,2 @@
[1]["SPAM
"]#

View file

@ -0,0 +1 @@
: spam ( -- ) "SPAM" print spam ;

View file

@ -0,0 +1 @@
: spam ( -- ) [ "SPAM" print t ] loop ;

View file

@ -0,0 +1,10 @@
class Main
{
public static Void main ()
{
while (true)
{
echo ("SPAM")
}
}
}

View file

@ -0,0 +1 @@
: email begin ." SPAM" cr again ;

View file

@ -0,0 +1,17 @@
PROGRAM INFINITELOOP
C While you can put this label on the WRITE statement, it is good
C form to label CONTINUE statements whenever possible, rather than
C statements that actually contain instructions. This way, you can
C indent inside the "loop" and make it more readable.
10 CONTINUE
WRITE (*,*) 'SPAM'
GOTO 10
C It is also good form to close the "loop" with another label. In
C this case, there is absolutely no reason to do this at all, but,
C if you wanted to break, you would be able to add `GOTO 20` to
C exit the loop.
20 CONTINUE
STOP
END

View file

@ -0,0 +1,3 @@
DO
WRITE(*,*) "SPAM"
END DO

View file

@ -0,0 +1,2 @@
10 WRITE(*,*) "SPAM"
GOTO 10

View file

@ -0,0 +1,2 @@
while(1)
show_message("SPAM")

View file

@ -0,0 +1,7 @@
package main
import "fmt"
func main() {
for {
fmt.Printf("SPAM\n")
}
}

View file

@ -0,0 +1,3 @@
while (true) {
println 'SPAM'
}

View file

@ -0,0 +1 @@
forever (putStrLn "SPAM")

View file

@ -0,0 +1,2 @@
import Control.Monad.Fix (fix)
fix (putStrLn "SPAM" >>)

View file

@ -0,0 +1,3 @@
DO i = 1, 1E20 ! for i with 16 or more digits: i == i + 1 == loop infinite
WRITE() "SPAM"
ENDDO

View file

@ -0,0 +1 @@
while 1 do print,'SPAM'

View file

@ -0,0 +1,3 @@
procedure main()
repeat write("SPAM")
end

View file

@ -0,0 +1,9 @@
until &fail do write("SPAM") # always fails, needs succeed to break
...
while write("SPAM") # always succeeds, needs failure to break
...
every write(|"SPAM") # generator always succeeds, needs failure to break
...
while write(|"SPAM") # this is a common mistake that results in an endless loop
...
while write(1 to 5) # a clearer version of the same mistake that generates endless 1's

View file

@ -0,0 +1 @@
loop("SPAM" println)

View file

@ -0,0 +1 @@
(-[smoutput bind 'SPAM')^:_(1)

View file

@ -0,0 +1 @@
smoutput bind 'SPAM'^:1e99 ''

View file

@ -0,0 +1,3 @@
while(true){
System.out.println("SPAM");
}

View file

@ -0,0 +1,3 @@
for(;;){
System.out.println("SPAM");
}

View file

@ -0,0 +1 @@
for (;;) print("SPAM");

View file

@ -0,0 +1 @@
while (true) print("SPAM");

View file

@ -0,0 +1,3 @@
DEFINE loop == [true []] dip while.
["SPAM\n" putchars] loop.

View file

@ -0,0 +1 @@
while[1; `0:"SPAM\n"]

View file

@ -0,0 +1 @@
do "SPAM\n" . loop

View file

@ -0,0 +1,4 @@
while 1
print "SPAM"
wend
end

View file

@ -0,0 +1 @@
forever [print "SPAM]

View file

@ -0,0 +1,8 @@
while true do
print("SPAM")
end
--Another solution
repeat
print("SPAM")
until false

View file

@ -0,0 +1,3 @@
define(`spam',`SPAM
spam')
spam

View file

@ -0,0 +1 @@
while (1), printf('SPAM\n'); end;

View file

@ -0,0 +1 @@
while true do print "SPAM\n"

View file

@ -0,0 +1,3 @@
while (1)
player:tell("SPAM");
endwhile

View file

@ -0,0 +1 @@
FOR WRITE "SPAM",!

View file

@ -0,0 +1,3 @@
spam:
@echo SPAM
$(MAKE)

View file

@ -0,0 +1 @@
> do print(SPAM) end;

View file

@ -0,0 +1,3 @@
While[True,
Print@"SPAM";
]

View file

@ -0,0 +1 @@
do(disp("SPAM"));

View file

@ -0,0 +1 @@
forever: message "SPAM"; endfor end

View file

@ -0,0 +1,4 @@
LOOP
InOut.WriteString ("SPAM");
InOut.WriteLn
END;

View file

@ -0,0 +1,3 @@
LOOP
IO.Put("SPAM\n");
END;

View file

@ -0,0 +1,2 @@
while(1)
echo "SPAM\n";

View file

@ -0,0 +1 @@
print "SPAM\n" while 1;

View file

@ -0,0 +1 @@
(loop (prinl "SPAM"))

View file

@ -0,0 +1 @@
repeat, write('SPAM'), nl, fail.

View file

@ -0,0 +1,2 @@
while 1:
print "SPAM"

View file

@ -0,0 +1 @@
repeat print("SPAM")

View file

@ -0,0 +1,5 @@
/*REXX program to display the word SPAM forever. */
do forever
say "SPAM"
end

View file

@ -0,0 +1,12 @@
#lang racket
;; Using recursion
(define (loop)
(displayln "SPAM")
(loop))
(loop)
;; Using a for loop
(for ([i (in-naturals)])
(displayln "SPAM"))

View file

@ -0,0 +1,3 @@
loop do
puts "SPAM"
end

Some files were not shown because too many files have changed in this diff Show more