Closed Chromowolf closed 4 years ago
It is intended, f_parse has 2 return values, parsed value and digits. And simpleprint accepts varargs so you actually printed like this;
const number, digit = parse(address, base);
simpleprint(number, digit);
To fix: use [[0]]
or deconstruct like above and only use number value. It is intended to return digit as you can differentiate parse error and parse 0 by confirm digit is 0 or greater than 0.
I didn't want to introduce EUDErrno at that moment so decided to yield digits too, having refered other programming APIs.
Got it. Thank you. Sorry for not reading the ChangeLog carefully.
Expected output:
But I got this instead:
The return value of
parse
seems to have an unwanted trailing digit which equals the number of digits of the input number. Is this a bug or an intended feature? (PS: I'm using the current newest version 1.23.3.7146)