Artifacts Associated With Ticket 616480ffffffffff
Ticket change [3fab4a48bb] (rid 121502) by arjenmarkus on 2002-09-30 10:56:34:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
I find the binary command very useful for certain tasks, yet the description of the command in the man page is slightly confusing. Therefore I would like to submit some additional text for the man page that, I think, will clarify how to use it. (All the information is there, but it is spread over the various options, the additional text should summarise some aspects). [binary format] After the paragraph starting with "The formatString consists of ..." a new paragraph: Here is a small example to clarify the relation between the field specifiers and the arguments: binary format d3d {1.0 2.0 3.0 4.0} 0.1 The first argument is a list of four numbers, but because of the count of 3 for the associated field specifier, only the first three will be used. The second argument is associated with the second field specifier. The resulting binary string contains the four numbers 10, 2.0, 3.0 and 0.1. [binary scan] After the paragraph "As with binary format ..." A similar example as with [binary format] should explain the relation between field specifiers and arguments in case of the binary scan subcommand: binary scan $bytes d3d first second This command (provided the binary string in "bytes" is long enough) turns the variable "first" into a list of three numbers and it assigns a single value to the variable "second". Option "a" in the section on "binary scan": explain why variable var2 is left unmodified (I could not quite figure it out :-) - foundin initialized to: "None"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "arjenmarkus"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "binary command: addition to man page"
- type initialized to: "Patch"
Ticket change [852598729c] (rid 131271) by dkf on 2002-10-04 17:19:31:
- closedate changed to: "2002-10-04T10:19:31"
- closer changed to: "dkf"
- icomment:
Logged In: YES user_id=79902 Thanks for this. On the final point, part way through the second paragraph of "BINARY SCAN" we see: .... If there are not enough bytes left after the current cursor position to satisfy the current field specifier, then the corresponding variable is left untouched and binary scan returns immediately with the number of variables that were set. .... This is why var2 is unmodified; it can't get all the chars it wants so it does nothing. To warn you of this, [binary scan] just returns '1' to indicate that only one field was read from.
- login: "dkf"
- mimetype: "text/plain"
- priority changed to: "3 Low"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "dkf"
Ticket change [d911b989f1] (rid 107551) by nobody on 2002-10-07 13:30:07:
- icomment:
Logged In: NO Re var2 unmodified: Your explanation is very clear. I think it could/should be added to the example, as this will clarify the operation (and emphasize the use of the return code)
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment: