Skip to content
Tcl Source Code View Ticket
Login

View Ticket

Inverse logic in Tcl_DictObjNext() example on man page

Closed / Fixed2016740fffffffffffffffffffffffffffffffffCreated 18 years agoUpdated 18 years ago
Descriptionplain2008-07-12 18:00:24
The Tcl_DictObjNext() man page shows the following code in an example:

for (; done ; Tcl_DictObjNext(&search, &key, &value, &done)) {

However, the done variable is only set to TRUE when the whole dictionary has been processed and it is FALSE as long as the loop should continue. So the check of the for loop should be inverted:

for (; !done ; Tcl_DictObjNext(&search, &key, &value, &done)) {
dkf Ticket [2016740fff]: 3 changes [History diff]2008-07-13 06:26:13
dkf Closed ticket [2016740fff]. [History diff]2008-07-15 20:01:15
Log in (anonymous is fine) to add a comment.