Don't click here unless you want to be banned.

LSL Wiki : bracket

HomePage :: PageIndex :: RecentChanges :: RecentlyCommented :: UserSettings :: You are


Brackets are these characters:

[] {} <>

This discussion also includes something which are not brackets; parentheses. ()

The word "bracket" is frequently and imprecisely used to describe any of the four kinds of bracket-like characters used in LSL. All four types are used for different purposes and are not interchangable, so it's good to get their names straight. Some people will refer to parentheses as "brackets" while retaining the proper names for the other three types. This may be less confusing, but it's still wrong.

Name: Example: Used for: Example:


1. Containing arguments within a function or event.
2. For containing code in a statement.
3. When typecasting a value from one type to another.
1. llSay(0,"Hello.")
2. if ( (1 > 0) || (2 < 1) )
3. (string)random_number


Containing a code block. if (a) { // do stuff }
Square Brackets


Describing the contents of a list. list list_name = [1, 3.9, "Hello"];
Angle Brackets


Describing the values of a vector or rotation. Vector: <1.0, 2.0, 0.0>
Rotation: <0.0, 0.0, 0.0, 1.0>

There are 3 comments on this page. [Display comments/form]