Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
6
Task/Loops-Foreach/Pike/loops-foreach-1.pike
Normal file
6
Task/Loops-Foreach/Pike/loops-foreach-1.pike
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
int main(){
|
||||
array(int|string) collect = ({109, "Hi", "asdf", "qwerty"});
|
||||
foreach(collect, int|string elem){
|
||||
write(elem + "\n");
|
||||
}
|
||||
}
|
||||
6
Task/Loops-Foreach/Pike/loops-foreach-2.pike
Normal file
6
Task/Loops-Foreach/Pike/loops-foreach-2.pike
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
int main(){
|
||||
mapping(string:string) coll = (["foo":"asdf", "bar":"qwer", "quux":"zxcv"]);
|
||||
foreach (coll;string key;string val)
|
||||
write(key+" --> "+val+"\n");
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue