Initial data commit
This commit is contained in:
parent
72d218235f
commit
f23f22d71c
199087 changed files with 3378941 additions and 0 deletions
22
Task/Compound-data-type/NetRexx/compound-data-type.netrexx
Normal file
22
Task/Compound-data-type/NetRexx/compound-data-type.netrexx
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
/* NetRexx */
|
||||
options replace format comments java crossref symbols nobinary
|
||||
|
||||
class RCompoundDataType
|
||||
method main(args = String[]) public static
|
||||
pp = Point(2, 4)
|
||||
say pp
|
||||
return
|
||||
|
||||
class RCompoundDataType.Point -- inner class "Point"
|
||||
properties indirect -- have NetRexx create getters & setters
|
||||
x = Integer
|
||||
y = Integer
|
||||
|
||||
method Point(x_ = 0, y_ = 0) public -- providing default values for x_ & y_ lets NetRexx generate intermediate constructors Point() & Point(x_)
|
||||
this.x = Integer(x_)
|
||||
this.y = Integer(y_)
|
||||
return
|
||||
|
||||
method toString() public returns String
|
||||
res = 'X='getX()',Y='getY()
|
||||
return res
|
||||
Loading…
Add table
Add a link
Reference in a new issue