LSL Portal Style

From Second Life Wiki
Revision as of 13:02, 2 January 2014 by Strife Onizuka (talk | contribs)
Jump to navigation Jump to search

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

  1. LSL Category Style - Used for categorizing groups of LSL functions and other Tables of Contents.
  2. LSL Function Style - Used for the full specification of all LSL functions.
  3. LSL Topic Style - Used for topics of interest related to using LSL (XML-RPC, quaternions, etc).
  4. LSL Constants Style - Used for documenting constants.