Add all the assignment code.
Signed-off-by: jmug <u.g.a.mariano@gmail.com>
This commit is contained in:
parent
58c6b1f81c
commit
cfe502c598
1277 changed files with 48709 additions and 1 deletions
15
hw6/hw5programs/compile_object_like.oat
Normal file
15
hw6/hw5programs/compile_object_like.oat
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
struct Point {
|
||||
int x;
|
||||
int y;
|
||||
((Point) -> int) f
|
||||
}
|
||||
|
||||
int sum(Point p) {
|
||||
return p.x + p.y;
|
||||
}
|
||||
|
||||
global p = Point {x=3; y=4; f=sum};
|
||||
|
||||
int program (int argc, string[] argv) {
|
||||
return p.f(p);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue