Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
Comment: | Update TIP with experience of implementing it |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
eb537ee186e7e0332b07f83e17bb03c8 |
User & Date: | dkf 2019-06-15 07:48:01.388 |
Context
2019-06-15
| ||
17:25 | Five TIPs all Accepted check-in: 2a211da819 user: dkf tags: trunk | |
07:48 | Update TIP with experience of implementing it check-in: eb537ee186 user: dkf tags: trunk | |
2019-06-14
| ||
14:45 | Formatting check-in: b2f25446c3 user: jan.nijtmans tags: trunk | |
Changes
Changes to tip/450.md.
1 2 3 4 5 6 7 8 9 | # TIP 450: Add [binary] subcommand "set" for in-place modification Author: Arjen Markus <[email protected]> State: Draft Type: Project Vote: Pending Created: 18-Jul-2016 Post-History: Tcl-Version: 8.7 Keywords: Tcl, binary data | > | 1 2 3 4 5 6 7 8 9 10 | # TIP 450: Add [binary] subcommand "set" for in-place modification Author: Arjen Markus <[email protected]> Author: Donal K. Fellows <[email protected]> State: Draft Type: Project Vote: Pending Created: 18-Jul-2016 Post-History: Tcl-Version: 8.7 Keywords: Tcl, binary data |
︙ | ︙ | |||
47 48 49 50 51 52 53 | The new command will have the effect that the first few steps are not necessary anymore. # Implementation Notes Besides the nominal case of a variable that contains a binary array that is to | | | > | | < | | < | < < < < < | < | < | < | | < < > | < < | < < | 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 | The new command will have the effect that the first few steps are not necessary anymore. # Implementation Notes Besides the nominal case of a variable that contains a binary array that is to be updated within the bounds of that array, four other cases exist and need to be prepared for: * The variable _varName_ does not exist yet: we must create the variable when writing back the binary value. * The variable _varName_ does not contain a binary string: we must convert the variable to a binary string (using the usual algorithm). * The variable _varName_ contains a binary string that is shared with other uses (such as being stored in other variables): we must duplicate the binary string in this case before updating it. * The updating would go past the memory allocated for the binary array: we must extend the binary array. _It is the Tcl programmer's responsibility to avoid these cases if they matter to them._ The **binary set** command will act in accordance with existing Tcl standard semantics. # Reference Implementation See the `tip-450` branch. # Copyright This document is placed in public domain. |