Skip to content
Tcl Source Code View Ticket
Login

View Ticket

2008-10-13
21:53 • Closed ticket [2163750fff]: Array set arrayName returns an error plus 8 othe... artifact: 177986fab8 user: dgp
14:35 • New ticket [2163750fff]. artifact: 57ca1b8e04 user: dansic

Array set arrayName returns an error

Closed / Invalid2163750fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2008-10-13 14:35:16
According to TCL documentation Array set when invoked with only an arrayName as an argument should create an array with an empty array value.  However

%array set foo

returns:

wrong # args: should be "array set arrayName list"

tclsh, wish with "info patchlevel 8.5.4" from ActiveTcl distribution.
dgpplain2008-10-13 21:53:43
The docs for [array] in Tcl 8.5.4,

http://www.tcl.tk/man/tcl8.5/TclCmd/array.htm#M11

document the valid syntax for [array set]:

  array set /arrayName/ /list/

The /list/ argument is not optional.
Log in (anonymous is fine) to add a comment.