Last Command

From GeoGebra Manual
Revision as of 10:15, 18 August 2011 by Alexander Hartl (talk | contribs)
Jump to: navigation, search


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 lastn 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 {1, 4}.
© 2024 International GeoGebra Institute