Overview
| Artifact ID: | 4c5dd20f56b8e9b0dbb59a742e3c1b98d5d44a2b7d63d94189e0681772d6ff6f |
|---|---|
| Ticket: | af4780b0b5245f035803b5fbeb1cfae62f40f821
Improve format #d documentation |
| User & Date: | jan.nijtmans on 2025-09-04 14:46:13 |
Changes
- icomment:
The benefit is being able to produce formatted integers with "0d", in the same way we can produce hex integers with "0x" prefix. In TIP #472: > Also extend format command '#' flag to produce the appropriate "0d" for the "%#d" conversion I realized that, since the C language doesn't implement the '#' flags for %d, this would be a potential incompatibility. Therefore, in TIP #476 I proposed to only let it have effect in combination with 0-padding or a width specifier: that's the only 2 situations the "0d" prefix really makes sense. Since Tcl 9.0 is the first Tcl version which understand 0d-prefixed integers, no-one uses this yet. But since the "0d" prefix is advertised as one of the features of Tcl 9, I wounldn't just remove this 'feature'.
- login: "jan.nijtmans"
- mimetype: "text/x-fossil-wiki"