all tasks
This commit is contained in:
parent
b83f433714
commit
68f8f3e56b
14735 changed files with 178959 additions and 0 deletions
29
Task/Variable-size-Get/Icon/variable-size-get.icon
Normal file
29
Task/Variable-size-Get/Icon/variable-size-get.icon
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
record rec0()
|
||||
record rec4(a,b,c,d)
|
||||
|
||||
procedure main() # get size
|
||||
|
||||
every i := seq(1) do {
|
||||
a0 := &allocated
|
||||
x := case i of {
|
||||
1 : "ABCDEFGH"
|
||||
2 : reverse(x)
|
||||
10 : &digits
|
||||
11 : x--x
|
||||
20 : []
|
||||
21 : [1,2]
|
||||
22 : [1,2,3]
|
||||
30 : set()
|
||||
31 : set("X")
|
||||
32 : set("A","B")
|
||||
40 : table(1)
|
||||
50 : rec0()
|
||||
51 : rec4()
|
||||
60 : create seq(1)
|
||||
99 : break
|
||||
default : next
|
||||
}
|
||||
a1 := &allocated
|
||||
write("type=",type(x)," *x=",*x," bytes allocated=",a1-a0)
|
||||
}
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue