Vanguard Software
Forecasting & Planning Solutions

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

  Forecasting Software  |  Strategic Planning Software  |  Decision Support Software
Decision Tree Analysis  |  Monte Carlo Simulation Software  |  Risk Analysis Software
Portfolio Analysis Software  |  Expert System Software  |  Online Surveys

Contact Us  |  Terms of Use  |  Privacy Policy  |  Site Map
Vanguard Software
© 2010 Vanguard Software Corporation
Home Products Solutions Services Customers Partners Company
Vanguard
Applying science to business management
Vanguard
Print this page   Email this page to a friend