Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
16
Task/Repeat-a-string/Objeck/repeat-a-string.objeck
Normal file
16
Task/Repeat-a-string/Objeck/repeat-a-string.objeck
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
bundle Default {
|
||||
class Repeat {
|
||||
function : Main(args : String[]) ~ Nil {
|
||||
Repeat("ha", 5)->PrintLine();
|
||||
}
|
||||
|
||||
function : Repeat(string : String, max : Int) ~ String {
|
||||
repeat : String := String->New();
|
||||
for(i := 0; i < max; i += 1;) {
|
||||
repeat->Append(string);
|
||||
};
|
||||
|
||||
return repeat;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue