Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
7
Task/Compound-data-type/CLU/compound-data-type-1.clu
Normal file
7
Task/Compound-data-type/CLU/compound-data-type-1.clu
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
% Definitions
|
||||
point = struct[x, y: int]
|
||||
mutable_point = record[x, y: int]
|
||||
|
||||
% Initialization
|
||||
p: point := point${x: 10, y: 20}
|
||||
mp: mutable_point := mutable_point${x: 10, y: 20}
|
||||
2
Task/Compound-data-type/CLU/compound-data-type-2.clu
Normal file
2
Task/Compound-data-type/CLU/compound-data-type-2.clu
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
foo := p.x
|
||||
bar := p.y
|
||||
2
Task/Compound-data-type/CLU/compound-data-type-3.clu
Normal file
2
Task/Compound-data-type/CLU/compound-data-type-3.clu
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
mp.x := 30
|
||||
mp.y := 40
|
||||
2
Task/Compound-data-type/CLU/compound-data-type-4.clu
Normal file
2
Task/Compound-data-type/CLU/compound-data-type-4.clu
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
foo := point$get_x(p)
|
||||
bar := point$get_y(p)
|
||||
2
Task/Compound-data-type/CLU/compound-data-type-5.clu
Normal file
2
Task/Compound-data-type/CLU/compound-data-type-5.clu
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
mutable_point$set_x(mp, 30)
|
||||
mutable_point$set_y(mp, 40)
|
||||
Loading…
Add table
Add a link
Reference in a new issue