Artifacts Associated With Ticket 1367506fffffffff
Ticket change [d9531362af] (rid 107592) by sbron on 2005-11-27 13:08:33:
- assignee initialized to: "hobbs"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Doing: [scan 0.99 %d.%d.%d.%d a b c d] returns 2 and only variables a and b are set. Variable c and d are not being touched. If these variables did not exist before, they still don't exist after the operation. Otherwise they will still have their old value. According to the manual page: "If no varName variables are specified, then scan works in an inline manner, returning the data that would otherwise be stored in the variables as a list". From this information I expect [scan 0.99 %d.%d.%d.%d] to return a list with two elements. However, the command returns a list with four elements: 0 99 {} {} - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "sbron"
- subsystem initialized to: "23. [scan]"
- title initialized to: "Inline scan returns too many items"
- type initialized to: "Bug"
Ticket change [842e9f06b9] (rid 117498) by sbron on 2005-11-27 20:25:08:
- foundin changed to: "obsolete: 8.4.11"
Add attachment "scan.patch" [126923a217] (rid 95301) by sbron on 2005-11-27 20:25:09.
Ticket change [72d39094b9] (rid 104929) by sbron on 2005-11-27 20:25:10:
- icomment:
File Added - 157677: scan.patch
- login: "sbron"
- mimetype: "text/plain"
- username: "sbron"
- icomment:
Ticket change [5e3990057a] (rid 115599) by hobbs on 2005-11-29 07:03:48:
- resolution changed to: "Invalid"
- status changed to: "Pending"
Ticket change [65a36d2b58] (rid 102585) by hobbs on 2005-11-29 07:03:49:
- closedate changed to: "2005-11-29T00:03:49"
- closer changed to: "hobbs"
- icomment:
Logged In: YES user_id=72656 Note that the next sentence is "In the inline case, an empty string is returned when the end of the input string is reached before any conversions have been performed.", and perhaps that needs augmenting to say that each %-sub that goes unmatched also makes an empty string. Inline scan does intentionally operate to return a list equal in length to the number of %-subs.
- login: "hobbs"
- mimetype: "text/plain"
- username: "hobbs"
Ticket change [3d6ab63d0d] (rid 121083) by sbron on 2005-12-02 23:32:14:
- icomment:
Logged In: YES user_id=37987 That next line refers to the fact that [scan "" %d.%d.%d.%d] returns an empty string and not a list of four empty strings. That is actually consistent with the expected result I described. The only situation that is inconsistent is a partial match. I have seen the code and noticed that it intentionally adds empty list entries. But that doesn't automatically make it the right thing to do. I do realize that this is unlikely to be changed because that might break existing code that accounts for the current behavior. So probably the only thing that can be done now is to warn people about this illogical behavior in the manual page.
- login: "sbron"
- mimetype: "text/plain"
- status changed to: "Open"
- username: "sbron"
- icomment: