Objects are the core of WikiTalk. Object have two kinds of members: methods and properties.
Properties represent characteristics of an object. For example, a DateTime object has a property called Hour that will answer back the hour of the day represented by the DateTime. As another example, a string object has a property that tells you how long it is.
Some examples of properties:
| "hello".Length | The length of the string (5). |
| topic.LastModifiedBy | The date and time indicating when the current topic was last modified. |
Unlike properties, methods have arguments. These argument provide additional information to the method explaining what you want it to do.
For example, string objects support a method called SubString that allows you to ask them for a particular "sub-string," defined by a starting character number and a length. These are the "arguments" for the SubString method.
For example,
"Hello".SubString(0, 2) -- Answers back the string "He"; 2 characters, starting at character 0
The arguments for a method can be any kind of WikiTalkExpression. For example,
"This long string".SubString(0, "four".Length)
This uses an expression (the length of the string "four", 4) as the second argument of the SubString method.
Every object in WikiTalk is of a particular type. There are a few dozen types of object in WikiTalk. For more information about these types, see WikiTalkTypes.