Difference between revisions of "LlGetListEntryType"

From Second Life Wiki
Jump to navigation Jump to search
m (link with the six llList2* functions that get entries of type float, integer, key, rot, string, or vector.)
(template updates)
Line 4: Line 4:
|p1_type=list|p1_name=src
|p1_type=list|p1_name=src
|p2_type=integer|p2_name=index
|p2_type=integer|p2_name=index
|func_footnote=If '''index''' is invalid then {{LSLG|TYPE_INVALID}} is returned.
|func_footnote=If '''index''' is invalid then {{LSL Const|TYPE_INVALID|integer|0|c=none}} is returned.
|func_desc
|func_desc
|return_text=that is the type of the entry '''index''' in '''src'''.
|return_text=that is the type of the entry '''index''' in '''src'''.
Line 18: Line 18:
!Description
!Description
{{!}}-
{{!}}-
{{!}}{{LSLG|TYPE_INTEGER}}
{{!}}{{LSL Const|TYPE_INTEGER|integer|1|c=integer}}
{{!}}1
{{!}}{{#var:value}}
{{!}}{{LSLG|integer}}
{{!}}[[integer]]
{{!}}-
{{!}}-
{{!}}{{LSLG|TYPE_FLOAT}}
{{!}}{{LSL Const|TYPE_FLOAT|integer|2|c=float}}
{{!}}2
{{!}}{{#var:value}}
{{!}}{{LSLG|float}}
{{!}}[[float]]
{{!}}-
{{!}}-
{{!}}{{LSLG|TYPE_STRING}}
{{!}}{{LSL Const|TYPE_STRING|integer|3|c=string}}
{{!}}3
{{!}}{{#var:value}}
{{!}}{{LSLG|string}}
{{!}}[[string]]
{{!}}}
{{!}}}
{{!}}
{{!}}
Line 36: Line 36:
!Description
!Description
{{!}}-
{{!}}-
{{!}}{{LSLG|TYPE_KEY}}
{{!}}{{LSL Const|TYPE_KEY|integer|4|c=key}}
{{!}}4
{{!}}{{#var:value}}
{{!}}{{LSLG|key}}
{{!}}[[key]]
{{!}}-
{{!}}-
{{!}}{{LSLG|TYPE_VECTOR}}
{{!}}{{LSL Const|TYPE_VECTOR|integer|5|c=vector}}
{{!}}5
{{!}}{{#var:value}}
{{!}}{{LSLG|vector}}
{{!}}[[vector]]
{{!}}-
{{!}}-
{{!}}{{LSLG|TYPE_ROTATION}}
{{!}}{{LSL Const|TYPE_ROTATION|integer|6|c=rotation}}
{{!}}6
{{!}}{{#var:value}}
{{!}}{{LSLG|rotation}}
{{!}}[[rotation]]
{{!}}}
{{!}}}
{{!}}
{{!}}
Line 54: Line 54:
!Description
!Description
{{!}}-
{{!}}-
{{!}}{{LSLG|TYPE_INVALID}}
{{!}}{{LSL Const|TYPE_INVALID|integer|0|c=none}}
{{!}}0
{{!}}{{#var:value}}
{{!}}None
{{!}}{{#var:comment}}
{{!}}}
{{!}}}
{{!}}}
{{!}}}
|examples
|examples
|helpers
|helpers
|also_functions={{LSL DefineRow||{{LSLG|llList2Float}}|}}
|also_functions={{LSL DefineRow||[[llList2Float]]|}}
{{LSL DefineRow||{{LSLG|llList2Integer}}|}}
{{LSL DefineRow||[[llList2Integer]]|}}
{{LSL DefineRow||{{LSLG|llList2Key}}|}}
{{LSL DefineRow||[[llList2Key]]|}}
{{LSL DefineRow||{{LSLG|llList2Rot}}|}}
{{LSL DefineRow||[[llList2Rot]]|}}
{{LSL DefineRow||{{LSLG|llList2String}}|}}
{{LSL DefineRow||[[llList2String]]|}}
{{LSL DefineRow||{{LSLG|llList2Vector}}|}}
{{LSL DefineRow||[[llList2Vector]]|}}
|also_events
|also_events
|also_tests
|also_tests
Line 72: Line 72:
|notes
|notes
|permission
|permission
|sort=GetListEntryType
|cat1=List
|cat1=List
|cat2
|cat2

Revision as of 06:07, 2 October 2007

Summary

Function: integer llGetListEntryType( list src, integer index );

Returns an integer that is the type of the entry index in src.

• list src
• integer index

index supports negative indexes. If index is invalid then TYPE_INVALID is returned.

Specification

Index Positive Negative
First 0 -length
Last length - 1 -1

Indexes

  • Positive indexes count from the beginning, the first item being indexed as 0, the last as (length - 1).
  • Negative indexes count from the far end, the first item being indexed as -length, the last as -1.

Type Description
TYPE_INTEGER 1 integer
TYPE_FLOAT 2 float
TYPE_STRING 3 string
Type Description
TYPE_KEY 4 key
TYPE_VECTOR 5 vector
TYPE_ROTATION 6 rotation
Type Description
TYPE_INVALID 0 none

Caveats

  • If index is out of bounds the script continues to execute without an error message.
All Issues ~ Search JIRA for related Bugs

Examples

See Also

Functions

•  llList2Float
•  llList2Integer
•  llList2Key
•  llList2Rot
•  llList2String
•  llList2Vector

Articles

•  Negative Index

Deep Notes

Search JIRA for related Issues

Signature

function integer llGetListEntryType( list src, integer index );