Difference between revisions of "Last Command"
From GeoGebra Manual
m (Bot: Automated text replacement (-{{command +{{command|cas=true)) |
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact ) |
||
Line 1: | Line 1: | ||
− | <noinclude>{{Manual Page|version=4. | + | <noinclude>{{Manual Page|version=4.2}}</noinclude> |
{{command|cas=true|list}} | {{command|cas=true|list}} | ||
;Last[ <List L> ] | ;Last[ <List L> ] |
Revision as of 22:15, 9 March 2013
- Last[ <List L> ]
- Gives a new list that contains the last element of the list L.
- Example:
Last[{1, 4, 3}]
yields {3}.
- Note: To get the last element use
Element[{1, 4, 3}, 3]
. - Last[ <List L>, <Number n of elements> ]
- Gives a new list that contains just the last n elements of the list L.
- Example:
Last[{1, 4, 3}, 2]
yields {4, 3}.
- Last[ <Text> ]
- Gives last character of the text.
- Example:
Last["Hello"]
yields "o".
- Last[ <Text> , <Number n of elements> ]
- Gives the last n characters of the text.
- Example:
Last["Hello",2]
yields "lo".
CAS Syntax
- Last[ <List L> ]
- Gives a new list that contains the last element of the list L.
- Example:
Last[{1, 4, 3}]
yields {3}.
- Note: To get the last element use
Element[{1, 4, 3}, 3]
. - Last[ <List L>, <Number n of elements> ]
- Gives a new list that contains just the last n elements of the list L.
- Example:
Last[{1, 4, 3}, 2]
yields {4, 3}.
Note:
See also First Command.