Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#4066 Inverse logic in Tcl_DictObjNext() example on man page

obsolete: 8.5.3
closed-fixed
8
2008-07-15
2008-07-12
Schelte Bron
No

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)) {

Discussion

    • labels: 104239 --> 15. Dict Object
    • priority: 5 --> 8
    • assigned_to: msofer --> dkf
     
    • status: open --> closed-fixed