From 6fb22be4d7e9183141668a61050ec7a284212c6a Mon Sep 17 00:00:00 2001 From: Sasha Koshka Date: Wed, 24 Aug 2022 05:49:11 +0000 Subject: [PATCH] Update 'Object Type Definitions' --- Object-Type-Definitions.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Object-Type-Definitions.md diff --git a/Object-Type-Definitions.md b/Object-Type-Definitions.md new file mode 100644 index 0000000..5bef5b8 --- /dev/null +++ b/Object-Type-Definitions.md @@ -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. \ No newline at end of file