[ use while/until and if/unless to draw attention to positive/negative conditions ]
lecture code viewer
downloads
Code
Lists, Arrays and Context
Lists, Arrays and Context
Martin Krzywinski
#!/usr/local/bin/perl
$\ = "\n";
@x = ();
for $num (1..10) {
$num2 = $num*$num;
push @x, $num2;
print qq(added $num2, now last element is $x[-1]);
}
|
3 |
Lists, Arrays and Context |
1.0.1.8.3
1.0.1.8.3.p1 |
Lists, Arrays and Context
|
Martin Krzywinski
|
ppt
1.0.1.8.3.c1 |
grow
|
Martin Krzywinski
|
code
1.0.1.8.3.c2 |
iteration
|
Martin Krzywinski
|
code
1.0.1.8.3.c3 |
pop
|
Martin Krzywinski
|
code
1.0.1.8.3.c4 |
push
|
Martin Krzywinski
|
code
1.0.1.8.3.c5 |
swap
|
Martin Krzywinski
|
code
1.0.1.8.3.a1 |
Lists, Arrays and Context
|
Martin Krzywinski
|
pdf
1.0.1.8.3.s1 |
Lists, Arrays and Context
|
Martin Krzywinski
|
slides
|