“Last 指令”的版本间的差异
来自GeoGebra Manual
小 (機器人:執行文字代換作業 (-{{command +{{command|cas=true)) |
(en) |
||
第14行: | 第14行: | ||
;Last[ <List> , <Number of Elements> ] | ;Last[ <List> , <Number of Elements> ] | ||
:{{translate|Last Command}} | :{{translate|Last Command}} | ||
+ | ;Last[ <List L> ] | ||
+ | :Gives a new list that contains the last element of the list ''L''. | ||
+ | :{{example|1=<div><code><nowiki>Last[{1, 4, 3}]</nowiki></code> yields ''{3}''.</div>}} | ||
+ | :{{note| 1=To get the last element use <code><nowiki>Element[{1, 4, 3}, 3]</nowiki></code>.}} | ||
+ | ;Last[ <List L>, <Number n of elements> ] | ||
+ | :Gives a new list that contains just the last ''n'' elements of the list ''L''. | ||
+ | :{{example|1=<div><code><nowiki>Last[{1, 4, 3}, 2]</nowiki></code> yields ''{4, 3}''.</div>}} | ||
+ | ;Last[ <Text> ] | ||
+ | :Gives last character of the text. | ||
+ | :{{example|1=<div><code><nowiki>Last["Hello"]</nowiki></code> yields ''"o"''.</div>}} | ||
+ | ;Last[ <Text> , <Number n of elements> ] | ||
+ | :Gives the last ''n'' characters of the text. | ||
+ | :{{example|1=<div><code><nowiki>Last["Hello",2]</nowiki></code> yields ''"lo"''.</div>}} | ||
+ | ==CAS Syntax== | ||
+ | ;Last[ <List L> ] | ||
+ | :Gives a new list that contains the last element of the list ''L''. | ||
+ | :{{example|1=<div><code><nowiki>Last[{1, 4, 3}]</nowiki></code> yields ''{3}''.</div>}} | ||
+ | :{{note| 1=To get the last element use <code><nowiki>Element[{1, 4, 3}, 3]</nowiki></code>.}} | ||
+ | ;Last[ <List L>, <Number n of elements> ] | ||
+ | :Gives a new list that contains just the last ''n'' elements of the list ''L''. | ||
+ | :{{example|1=<div><code><nowiki>Last[{1, 4, 3}, 2]</nowiki></code> yields ''{4, 3}''.</div>}} | ||
+ | {{note| 1=<div>See also [[First Command]].</div>}} |
2011年10月3日 (一) 09:33的最新版本
本頁為官方文件,一般使用者無法修改,若有任何誤謬,請與官方聯絡。如欲編輯,請至本頁的開放版。
- Last[ <List> ]
- Last[ <List> , <Number of Elements> ]
- Last[ <Text> ]
- Last[ <Text> , <Number of Elements> ]
CAS 視窗
- Last[ <List> ]
- Last[ <List> , <Number of Elements> ]
- Last[ <List L> ]
- Gives a new list that contains the last element of the list L.
- 範例:
Last[{1, 4, 3}]
yields {3}. - 備註: 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.
- 範例:
Last[{1, 4, 3}, 2]
yields {4, 3}. - Last[ <Text> ]
- Gives last character of the text.
- 範例:
Last["Hello"]
yields "o". - Last[ <Text> , <Number n of elements> ]
- Gives the last n characters of the text.
- 範例:
Last["Hello",2]
yields "lo".
CAS Syntax
- Last[ <List L> ]
- Gives a new list that contains the last element of the list L.
- 範例:
Last[{1, 4, 3}]
yields {3}. - 備註: 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.
- 範例:
Last[{1, 4, 3}, 2]
yields {4, 3}.
備註:
See also First Command.