Update 'Object Type Definitions'

Sasha Koshka 2022-08-24 05:49:11 +00:00
parent 5fc2ade5f6
commit 6fb22be4d7
1 changed files with 16 additions and 0 deletions

@ -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.