Difference between revisions of "LSL 101/LSL in Focus: Types"

From Second Life Wiki
Jump to navigation Jump to search
Line 8: Line 8:
==[[LSL 101/LSL in Focus:Integers|Integers]]==
==[[LSL 101/LSL in Focus:Integers|Integers]]==


Integers are the basic "whole" numbers (positive, negative and zero) of mathematics.  They are a very fundamental type in most computer languages.  In LSL, they are used in four distinct ways.
Integers are (a subset of) the basic "whole" numbers -- positive, negative and zero -- of mathematics.  They are a very fundamental type in most computer languages.  In LSL, they are used in four distinct ways.


* [[LSL 101/LSL in Focus:Integers#Signed Integers|Signed Integers]]
* [[LSL 101/LSL in Focus:Integers#Signed Integers|Signed Integers]]
* Truth Values (Booleans)
* [[LSL 101/LSL in Focus:Integers#Truth Values (Booleans)|Truth Values (Booleans)]]
* Enumerations
* [[LSL 101/LSL in Focus:Integers#Enumerations|Enumerations]]
* Bit Vectors
* [[LSL 101/LSL in Focus:Integers#Bit Vectors|Bit Vectors]]


==[[LSL 101/LSL in Focus: Floats|Floats]]==
==[[LSL 101/LSL in Focus: Floats|Floats]]==

Revision as of 15:32, 1 June 2009

↑̲  Language Topics in Focus  ̲↑ Integers →

Summary of Types

In a scripting language, types are a way of categorizing the values that the language can manipulate. In LSL, there are seven different types. Each of these types has its own representation and its own set of operations and/or built-in functions for manipulating values of that type. Here's a quick overview of each type and how it is used in LSL.

Integers

Integers are (a subset of) the basic "whole" numbers -- positive, negative and zero -- of mathematics. They are a very fundamental type in most computer languages. In LSL, they are used in four distinct ways.

Floats

Strings

Keys

Lists

Vectors

Rotations