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

obsolete: 8.5.3
closed-fixed
8
2008-07-15
2008-07-12
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

  • Donal K. Fellows

    • labels: 104239 --> 15. Dict Object
    • priority: 5 --> 8
    • assigned_to: msofer --> dkf
     
  • Donal K. Fellows

    • status: open --> closed-fixed
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks