blob: cf6fd7f3f167be587253482bab072885e74ff55b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
BEGIN
{
@map[8 - 1] = count();
printf("=> Print with one element\n");
print(@map);
zero(@map);
printf("=> Print after zero:\n");
print(@map);
@map[7] = count();
@map[5] = 42;
@map[3 + 1] = 9999;
@map[897123] = 9997;
@top = 2;
printf("=> Print top %d:\n", @top);
print(@map, @top);
printf("=> Using printf:\n");
printf("%d + %d\n", @map[4], @map[7]);
}
END
{
@map[7] = count();
printf("=> Print all map:\n");
print(@map);
clear(@map);
printf("=> Print after clear:\n");
print(@map);
}
|