TailOfList |
Type | operator |
Dictionary | LCB |
Library | LiveCode Builder |
Syntax | the tail of <Target>
|
Associations | com.livecode.list |
Summary | Returns the last element of Target.
|
Parameters | Name | Type | Description |
---|
Target | | An expression which evaluates to a list.
|
|
Example | variable tVar as List
put the empty list into tVar
push "first element" onto tVar
push "last element" onto tVar
variable tResult as String
if the tail of tVar is "last element" then
put "success" into tResult
end if
|
Values | Name | Type | Description |
---|
return | | The last element of Target
|
|
Related | Operator: IndexedElementOfList
|
Description | Returns the first element of the list Target without modifying Target.
the tail of tVar
is equivalent to using the IndexedElementOfList operator with index -1
tVar[-1]
|
Tags | lists |