Difference between revisions of "LavishScript:Object Types"
Jump to navigation
Jump to search
m (LavishScript:Data Types moved to LavishScript:Object Types) |
|||
Line 1: | Line 1: | ||
== Terms == | == Terms == | ||
* Member | * Member | ||
− | : A ''member'' in the [[LavishScript]] context means a value associated with the | + | : A ''member'' in the [[LavishScript]] context means a value associated with the object type, referred to by a specific term. ''Members'' are accessed with a <tt>.</tt> |
* Method | * Method | ||
− | : A ''method'' in the [[LavishScript]] context means a function or action associated with the | + | : A ''method'' in the [[LavishScript]] context means a function or action associated with the object type, referred to by a specific term. ''Methods'' are accessed with a <tt>:</tt> |
* Index | * Index | ||
: An ''index'' in the [[LavishScript]] context means a value or set of values that, when used with a ''member'' or ''method'', indicates parameters such as coordinates to be used in retrieving a value or taking an action. Indices are surrounded with <tt>[ ]</tt>, and separated by a <tt>,</tt> | : An ''index'' in the [[LavishScript]] context means a value or set of values that, when used with a ''member'' or ''method'', indicates parameters such as coordinates to be used in retrieving a value or taking an action. Indices are surrounded with <tt>[ ]</tt>, and separated by a <tt>,</tt> | ||
* Inherit | * Inherit | ||
− | : If | + | : If an object type ''inherits'' another, ''members'' and ''methods'' of the inherited datatype can be used as if they were of the original object type, if not defined by the original object type. |
== Introduction == | == Introduction == | ||
− | + | Object Types, also known as data types, are the complement to objects, including [[LavishScript:Top-Level Objects|Top-Level Objects]] (TLOs) and Variables. Where a variable is a ''specific'' object, an object type describes a ''class'' of objects (i.e. the type of object). For example, "table" would be an object type, but "my dining table" would be an object. Everything said about "my dining table" can ''generally'' be said about every other table. Thus, an object type is a ''generalized'' way of describing many objects. Using this generalization makes it relatively easy to work with a large number of objects, because they are all described in the same way, and that's the idea behind object types. | |
− | == Built-in | + | == Built-in Object Types == |
=== Data Storage === | === Data Storage === | ||
==== Text ==== | ==== Text ==== |
Revision as of 04:14, 23 February 2006
Contents
Terms
- Member
- A member in the LavishScript context means a value associated with the object type, referred to by a specific term. Members are accessed with a .
- Method
- A method in the LavishScript context means a function or action associated with the object type, referred to by a specific term. Methods are accessed with a :
- Index
- An index in the LavishScript context means a value or set of values that, when used with a member or method, indicates parameters such as coordinates to be used in retrieving a value or taking an action. Indices are surrounded with [ ], and separated by a ,
- Inherit
- If an object type inherits another, members and methods of the inherited datatype can be used as if they were of the original object type, if not defined by the original object type.
Introduction
Object Types, also known as data types, are the complement to objects, including Top-Level Objects (TLOs) and Variables. Where a variable is a specific object, an object type describes a class of objects (i.e. the type of object). For example, "table" would be an object type, but "my dining table" would be an object. Everything said about "my dining table" can generally be said about every other table. Thus, an object type is a generalized way of describing many objects. Using this generalization makes it relatively easy to work with a large number of objects, because they are all described in the same way, and that's the idea behind object types.