Skip to content
Tcl Source Code View Ticket
Login

View Ticket

lseq, lindex end off by one

Closed / Fixed99e834bf33a434340b8500255c92404d9329a6bbCreated 4 years agoUpdated 4 years ago
Descriptionplain2022-09-29 09:55:27
% set zs [lseq 1 4]
1 2 3 4
% puts [lindex $zs end]

% puts [lindex $zs end-1]
4

% puts [llength $zs]
4

% foreach a $zs {puts $a}
1
2
3
4
%


lindex end should yield the last element.
griffin Closed ticket [99e834bf33]. [History diff]2022-09-29 16:32:39
Log in (anonymous is fine) to add a comment.