Update 'Object Type Definitions'
parent
5fc2ade5f6
commit
6fb22be4d7
|
@ -0,0 +1,16 @@
|
|||
Object types can be defined like this:
|
||||
|
||||
```
|
||||
objt ro Rectangle:Obj
|
||||
ro x:Int
|
||||
ro y:Int
|
||||
ro width:Int 16
|
||||
ro width:Height 16
|
||||
```
|
||||
|
||||
The "type" of an object type definition is what object it inherits. Most objects
|
||||
will inherit from Obj, which is a blank object.
|
||||
|
||||
Object definitions have a list of members, preceded by a permission. Members can
|
||||
have simple or complex initializations, or none at all. These act as the default
|
||||
values for those members.
|
Reference in New Issue