Difference between revisions of "Take Command"

From GeoGebra Manual
Jump to: navigation, search
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|list}}
 
{{command|list}}
; Take[List, Start Position m, End Position n]: Returns a list containing the elements from position ''m'' to ''n'' of the initial list.
+
;Take[ <List>, <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 list containing the elements from position ''m'' to ''n'' of the initial list.
 +
;Take[ <Text>, <Start Position m>, <End Position n>]
 +
:Returns a text containing the elements from position ''m'' to ''n'' of the initial text.
 
==CAS Syntax==
 
==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.
+
;Take[ <List>, <Start Position m>, <End Position n>]
 
+
:Returns a list containing the elements from position ''m'' to ''n'' of the initial list.
{{example|1=<code>Take[{1,2,a,4,5},2,4]</code> yields ''{2,a,4}''.}}
+
{{example| 1=<div><code><nowiki>Take[{1, 2, a, 4, 5}, 2, 4]</nowiki></code> yields ''{2, a, 4}''.</div>}}

Revision as of 11:46, 5 September 2011


Take[ <List>, <Start Position m>, <End Position n> ]
Returns a list containing the elements from position m to n of the initial list.
Take[ <Text>, <Start Position m>, <End Position n>]
Returns a text containing the elements from position m to n of the initial text.

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}.
© 2024 International GeoGebra Institute