Repeat: Difference between revisions

378 bytes added ,  5 years ago
Line 537:
 
ИП4 С/П КИП4 В/О</lang>
 
=={{header|Modula-2}}==
<lang modula2>MODULE Repeat;
FROM Terminal IMPORT WriteString,WriteLn,ReadChar;
 
TYPE F = PROCEDURE;
 
PROCEDURE Repeat(fun : F; c : INTEGER);
VAR i : INTEGER;
BEGIN
FOR i:=1 TO c DO
fun
END
END Repeat;
 
PROCEDURE Print;
BEGIN
WriteString("Hello");
WriteLn
END Print;
 
BEGIN
Repeat(Print, 3);
 
ReadChar
END Repeat.</lang>
 
=={{header|Objeck}}==
1,452

edits