Vanguard Software
Forecasting & Planning Solutions
Home Products Solutions Services Customers Partners Company
 
Applying science to business management

contents.gifindex.gifprev1.gifnext1.gif

sublist

Format: sublist( list, offset, len )

Arguments: [any] list Input list

(int) offset Starting location of the sublist

(int) len Length of the sublist

Returns: [any] The portion of list beginning at offset and containing len elements

Note: The offset argument can be a list of integers that specify a position deep within a hierarchical list. The first integer in the list is the offset on the first level, the second element is the offset on the second level, and so on. For example, the element at offset 2 in the list [[1,2],[3,4,5],[6,7]] is the sublist [3,4,5]. The element at offset [2,3] is the number 5.

Examples: sublist([3,4,5,6,7],0,2) = [3,4]

sublist([3,4,5,6,7],1,3) = [4,5,6]

sublist([3,4,5,6,7],1,100) = [4,5,6,7]

sublist([3,4,5,6,7],100,5) = null

sublist([[1,2],[3,4]],[1,1],1) = 4

See Also: List Element, index, replist, last

  Demand Planning  |  Financial Forecasting
Forecasting Software  |  Strategic Planning Software  |  Decision Tree Software
Decision Support Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2011 Vanguard Software Corporation
Print this page   Email this page to a friend