4 ms·
Okay, so if it's null-terminated, how does one represent a zero?
by ananonymoususer 5y ago
Okay, so if it's null-terminated, how does one represent a zero?
- tom_ 5y agoDecide that the null value is one of the invalid digits - e.g., %1111. 0 can remain %0000.
- edoceo 5y ago"0\x00"?
- Pxtl 5y agoF-terminated might work better (given 1-nybble-per-digit BCD), or do a Pascal-style length prefix. I was less fixated on the implementation detail than I am about the basic concept of: arbitrary length numeric strings with numeric semantics and string-like storage and length characteristics.