Difference between revisions of "LSL Portal Style"
Jump to navigation
Jump to search
Line 1: | Line 1: | ||
This is a place holder for the [[Talk:LSL_Portal_Style|discussion page]]. | This is a place holder for the [[Talk:LSL_Portal_Style|discussion page]]. | ||
== Integer constants (hex vs. decimal) == | |||
:'''Q:''' Why are some constants written in hexadecimal and others in decimal notation? | |||
:'''A:''' Patterns. No constant is an island, they all exists within a larger context. Some constants are intended to be OR'ed, some are just simple counting numbers, sometimes the notation can give hints as to how you can manipulate the answer. Some examples: | |||
:* [[PARCEL_FLAG_USE_ACCESS_LIST]] - Written in hexadecimal to show the pattern of it and it's siblings. In the table they are extra wide to aid in the reading. | |||
:* [[llSetCameraParams]] - Written in decimal notation, the flags are consecutively allocated. | |||
:* [[ERR_GENERIC]] - Written in hexadecimal as to show that all the bits are turned on, this is to give the hint that you can do <code>~llSubStringIndex</code>. | |||
:* [[llParticleSystem]] is a good example where both notations are used for constants. Different constants used within the function have different relationships. | |||
== Old Style Discussions == | == Old Style Discussions == |
Revision as of 12:02, 2 January 2014
This is a place holder for the discussion page.
Integer constants (hex vs. decimal)
- Q: Why are some constants written in hexadecimal and others in decimal notation?
- A: Patterns. No constant is an island, they all exists within a larger context. Some constants are intended to be OR'ed, some are just simple counting numbers, sometimes the notation can give hints as to how you can manipulate the answer. Some examples:
- PARCEL_FLAG_USE_ACCESS_LIST - Written in hexadecimal to show the pattern of it and it's siblings. In the table they are extra wide to aid in the reading.
- llSetCameraParams - Written in decimal notation, the flags are consecutively allocated.
- ERR_GENERIC - Written in hexadecimal as to show that all the bits are turned on, this is to give the hint that you can do
~llSubStringIndex
. - llParticleSystem is a good example where both notations are used for constants. Different constants used within the function have different relationships.
Old Style Discussions
- LSL Category Style - Used for categorizing groups of LSL functions and other Tables of Contents.
- LSL Function Style - Used for the full specification of all LSL functions.
- LSL Topic Style - Used for topics of interest related to using LSL (XML-RPC, quaternions, etc).
- LSL Constants Style - Used for documenting constants.