Artifacts Associated With Ticket 787960
Ticket change [27ae78bafb] (rid 88562) by nobody on 2003-08-13 10:45:00:
- assignee initialized to: "andreas_kupries"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Since tcl's underlying I/O system seems to support this already, it would be handy if read had an "all-or-nothing" option which, when used with a channel in non-blocking mode, causes read to return data only when the specified number of bytes are available for reading. If insufficient data is available, it returns nothing. This is in contrast to the normal mode of operation in which the available characters are returned even if less than the number requested. Suggestion submitted by Mario Becroft <[email protected]>
- foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "nobody"
- subsystem initialized to: "24. Channel Commands"
- title initialized to: "read all-or-nothing option"
- type initialized to: "RFE"
Ticket change [0957b20ea0] (rid 89705) by dkf on 2003-10-29 16:19:37:
- icomment:
Logged In: YES user_id=79902 I like this idea; perhaps it would be best done as an option to [read]? It might also be nice to have an option to get data in a certain granularity, so that you can guarantee (for example) that you only ever get complete 8-byte integers suitable for feeding into [binary scan]. Sure you can work around this sort of thing, but it is a pain and can easily be done in Tcl's channel layer since you've already got something like that for handling encodings and the reading of lines... It's a good and simplifying suggestion, so boosting the Prio
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "7 High"
- username: "dkf"
- icomment:
Ticket change [d14d92bf10] (rid 113324) by andreas_kupries on 2006-03-17 06:05:59:
- icomment:
Logged In: YES user_id=75003 While I like the idea of [read -xxx 8] for xxx the name of the option, I am not sure that I understand the need for an additional option -yyy for the granularity. I want the 8-byte integer, I say [read -xxx 8] ... Ah. Wait. you might wish to read an array of 8-byte integer, eh ? Say, 10 of them. And instead of writing [read -xxx 80], or even [read -xxx [expr {10*8}]] (well, with appropriate variables, you (dkf) are thinking about [read -xxx -yyy 8 10]. And the default for -yyy is 1, i.e. bytes. In this context [read -all-or-nothing -size 8 10]. Ok. - login: "andreas_kupries"
- mimetype: "text/plain"
- username: "andreas_kupries"
- icomment: