Function Entry: VLE-SUBLIST

← Prev | ↑ Chapter | Next → | Index | Symbols

Function Entry: VLE-SUBLIST

Name

vle-sublist

Class

BricsCAD VLE Library Function

Syntax

(vle-sublist lst startidx nritems)

Arguments and Values

  • lst list to extract a sublist from
  • startidx index of first item for sublist (0-based); if
  • startidx is <
  • 0, 0 is used
  • nritems
  • number of items to be copied from lst list; if
  • nritems is < 0,
  • all items after startidx
  • are copied to result list

Description

creates a sublist from given input list lst, starting with item at index startidx and of maximum nritems number of list items from lst

Return Values

a sublist of lst starting with index startidx and containing nritems of input list lst;

if lst has not enough items, only the items of lst are copied to result list, no NIL is appended

Examples

(vle-sublist '(1 2 3 4 5 6 7)
2 3)  => '(3 4 5)

(vle-sublist '(1 2 3 4 5 6 7) 2 -1) => '(3
4 5 6 7)

(vle-sublist '(1 2 3 4 5 6 7) 2 10) => '(3
4 5 6 7)

Notes

index is 0-based

Availability

  • AutoCAD 2026: not documented.
  • BricsCAD V26: documented.
  • Status: BricsCAD-only.

Source Notes