Difference between revisions of "Take Command"
From GeoGebra Manual
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude> | <noinclude>{{Manual Page|version=4.0}}[[Category:Manual (official)|{{PAGENAME}}]]</noinclude> | ||
{{command|cas=true|list}} | {{command|cas=true|list}} | ||
+ | ;Take[ <List>, <Start Position m>] | ||
+ | :Returns a list containing the elements from position ''m'' to the end of the initial list. | ||
+ | :{{example| 1=<div><code><nowiki>Take[{2, 4, 3, 7, 4}, 3]</nowiki></code> yields ''{3, 7, 4}''.</div>}} | ||
+ | |||
+ | ;Take[ <Text>, <Start Position m>] | ||
+ | :Returns a text containing the elements from position ''m'' to the end of the initial text. | ||
+ | :{{example| 1=<div><code><nowiki>Take["GeoGebra", 3]</nowiki></code> yields the text ''oGebra''.</div>}} | ||
+ | |||
;Take[ <List>, <Start Position m>, <End Position n> ] | ;Take[ <List>, <Start Position m>, <End Position n> ] | ||
:Returns a list containing the elements from position ''m'' to ''n'' of the initial list. | :Returns a list containing the elements from position ''m'' to ''n'' of the initial list. | ||
:{{example| 1=<div><code><nowiki>Take[{2, 4, 3, 7, 4}, 3, 4]</nowiki></code> yields ''{3, 7}''.</div>}} | :{{example| 1=<div><code><nowiki>Take[{2, 4, 3, 7, 4}, 3, 4]</nowiki></code> yields ''{3, 7}''.</div>}} | ||
+ | |||
;Take[ <Text>, <Start Position m>, <End Position n>] | ;Take[ <Text>, <Start Position m>, <End Position n>] | ||
:Returns a text containing the elements from position ''m'' to ''n'' of the initial text. | :Returns a text containing the elements from position ''m'' to ''n'' of the initial text. | ||
:{{example| 1=<div><code><nowiki>Take["GeoGebra", 3, 6]</nowiki></code> yields the text ''oGeb''.</div>}} | :{{example| 1=<div><code><nowiki>Take["GeoGebra", 3, 6]</nowiki></code> yields the text ''oGeb''.</div>}} | ||
+ | |||
+ | |||
==CAS Syntax== | ==CAS Syntax== | ||
;Take[ <List>, <Start Position m>, <End Position n>] | ;Take[ <List>, <Start Position m>, <End Position n>] | ||
:Returns a list containing the elements from position ''m'' to ''n'' of the initial list. | :Returns a list containing the elements from position ''m'' to ''n'' of the initial list. | ||
:{{example| 1=<div><code><nowiki>Take[{1, 2, a, 4, 5}, 2, 4]</nowiki></code> yields ''{2, a, 4}''.</div>}} | :{{example| 1=<div><code><nowiki>Take[{1, 2, a, 4, 5}, 2, 4]</nowiki></code> yields ''{2, a, 4}''.</div>}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− |
Revision as of 11:14, 21 December 2012
- Take[ <List>, <Start Position m>]
- Returns a list containing the elements from position m to the end of the initial list.
- Example:
Take[{2, 4, 3, 7, 4}, 3]
yields {3, 7, 4}.
- Take[ <Text>, <Start Position m>]
- Returns a text containing the elements from position m to the end of the initial text.
- Example:
Take["GeoGebra", 3]
yields the text oGebra.
- Take[ <List>, <Start Position m>, <End Position n> ]
- Returns a list containing the elements from position m to n of the initial list.
- Example:
Take[{2, 4, 3, 7, 4}, 3, 4]
yields {3, 7}.
- Take[ <Text>, <Start Position m>, <End Position n>]
- Returns a text containing the elements from position m to n of the initial text.
- Example:
Take["GeoGebra", 3, 6]
yields the text oGeb.
CAS Syntax
- Take[ <List>, <Start Position m>, <End Position n>]
- Returns a list containing the elements from position m to n of the initial list.
- Example:
Take[{1, 2, a, 4, 5}, 2, 4]
yields {2, a, 4}.