Difference between revisions of "LavishScript:Object Types"

From Lavish Software Wiki
Jump to navigation Jump to search
Line 54: Line 54:
 
; Other
 
; Other
 
* [[DataType:type|type]]
 
* [[DataType:type|type]]
 +
* [[DataType:variable|variable]]
  
 
== See Also ==
 
== See Also ==
 
* [[LavishScript:Top-Level Objects|Top-Level Objects]]
 
* [[LavishScript:Top-Level Objects|Top-Level Objects]]
 
* [[LavishScript:Variables|Variables]]
 
* [[LavishScript:Variables|Variables]]

Revision as of 07:52, 27 March 2005

Terms

  • Member
A member in the LavishScript context means a value associated with the datatype, 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 datatype, 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 a datatype inherits another, members and methods of the inherited datatype can be used as if they were of the original datatype, if not defined by the original datatype.

Introduction

Data Types are the complement to Top-Level Objects (TLOs). Where a TLO is a specific object, a data type describes a type of object. For example, "table" would be a data type, but "my dining table" would be an object. Everything said about "my dining table" can generally be said about every other table. Thus, a data 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 data types.

Describing Usage

(note: This refers to discussions, rather than actual usage syntax. see Syntax)
When describing usage of a datatype and its members or methods, as opposed to having a specific Top-Level Object to discuss, the name of the data type in its original lower-case form is used. This is because TLOs are usually capitalized, and this is how to differentiate between talking about string, the data type, and String, the TLO. Additionally, most TLOs, including String, use an index, making it incorrect to describe String.Arg. It would be correct to describe string.Arg or String[].Arg.

Accessing Members
  • type.Member
  • type.Member[index]
Accessing Methods
  • type:Method
  • type:Method[index]

Built-in Data Types

Data Storage

Text
Numbers
Boolean (TRUE/FALSE)
Pointers (LavishScript 1.07)
List
Other

Utilities

Other

See Also