Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
16
Task/Compound-data-type/PascalABC.NET/compound-data-type.pas
Normal file
16
Task/Compound-data-type/PascalABC.NET/compound-data-type.pas
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
type
|
||||
Point = class
|
||||
x,y: integer;
|
||||
constructor(x,y: integer) := (Self.x,Self.y) := (x,y);
|
||||
end;
|
||||
PointRec = record
|
||||
x,y: integer;
|
||||
constructor(x,y: integer) := (Self.x,Self.y) := (x,y);
|
||||
end;
|
||||
|
||||
begin
|
||||
var p := new Point(2,3);
|
||||
Println(p.x,p.y);
|
||||
var pr := new PointRec(4,5);
|
||||
Println(pr.x,pr.y);
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue