# Error in lreplace.
Closed / Works For Me37f485b87c6e00dc917ff014e363d6ea31e404f9Created 4 years agoUpdated 4 years ago
Descriptionplain2022-11-27 17:01:10
########################################################
# Error in lreplace.
########################################################
puts "$::tcl_patchLevel\n$::tcl_platform(os); $::tcl_platform(machine);\
$::tcl_platform(platform); $::tcl_platform(osVersion); $::tcl_platform(wordSize);"
if { [catch { set var [lreplace {a b c d e} 12345 end+2 f g h i] } res ] } {
puts "res = $res"
}
########################################################
#Output:
Windows NT; intel; windows; 10.0; 4;
res = list doesn't contain element 12345
########################################################
# But, according https://tcl.tk/man/tcl/TclCmd/lreplace.htm, must be var=
#a b c d e f g h i
########################################################
jan.nijtmanswiki2022-11-27 22:42:19
I get:
% lreplace {a b c d e} 12345 end+2 f g h i
a b c d e f g h i
So works for me
dgpplain2022-11-28 14:42:58
This was fixed in release 8.6.9 long ago. Update to 8.6.13 is recommended.
Log in (anonymous is fine) to add a comment.