ltrunc Tcl Command

NAME

ltrunc - truncate a list

SYNOPSIS

dmh::ltrunc list_name ?n?

DESCRIPTION

This command is used to truncate a list; in other words, to remove elements from the tail (righthand) end. The optional n argument indicates the number of elements to be removed. It defaults to 1. If more elements are removed than exist, an empty list is obtained. The command revises the value of the named list and it also returns the truncated list as a result.

AUTHOR

Ed Hume, Hume Integration Software

KEYWORDS

list, list truncation