Mercury Bugs - mercury | |||||
View Issue Details | |||||
ID | Project | Category | View Status | Date Submitted | Last Update |
0000502 | mercury | Feature Request | public | 2020-04-28 23:25 | 2020-06-09 11:37 |
Reporter | zs | ||||
---|---|---|---|---|---|
Assigned To | juliensf | ||||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | resolved | Resolution | fixed | ||
Platform | OS | OS Version | |||
Product Version | |||||
Target Version | Fixed in Version | ||||
Summary | 0000502: print unsigned numbers | ||||
Description | string.format and io.format should be able to print unsigned integers without the user having to explicitly convert them to a signed integer first. At the monent, signed ints can be printed with the d and i conversion chars, which print them as the signed ints they are, and with the o, u, x, X, and p conversion chars, which print them as if they were unsigned. I think the last five should be the conversion chars for which one should be able to pass *either* a i(int) poly_type, *or* a u(uint) polytype. | ||||
Additional Information | When targeting C, the Mercury standard library can use either sprintf, or its own implementation. We have long defaulted to using sprintf, but we do already bypass it when dealing with data it would mishandle, such as non-ASCII UTF chars. The argument in favor of using sprintf has always been that it is faster than the library's format string interpreter, but this argument has lost most of its force when we started interpreting format strings at compile time. Perhaps it is time to stop using sprintf. | ||||
Tags | No tags attached. | ||||
Relationships | |||||
Attached Files |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|
Issue History | |||||
Date Modified | Username | Field | Change | ||
---|---|---|---|---|---|
2020-04-28 23:25 | zs | New Issue | |||
2020-04-29 17:42 | juliensf | Note Added: 0001090 | |||
2020-05-01 17:33 | zs | Note Added: 0001091 | |||
2020-05-01 18:21 | juliensf | Note Added: 0001092 | |||
2020-05-22 14:27 | juliensf | Assigned To | => juliensf | ||
2020-05-22 14:27 | juliensf | Status | new => assigned | ||
2020-06-09 11:37 | juliensf | Status | assigned => resolved | ||
2020-06-09 11:37 | juliensf | Resolution | open => fixed | ||
2020-06-09 11:37 | juliensf | Note Added: 0001093 |