Re: [fpc-pascal] StrToInt documentation misses a functionality (maybe two?)

2026-02-13 Thread Jean SUZINEAU via fpc-pascal

Documentation about number literals :

https://www.freepascal.org/docs-html/current/ref/refse6.html#x17-160001.6

___
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] StrToInt documentation misses a functionality (maybe two?)

2026-02-13 Thread Bart via fpc-pascal
On Fri, Feb 13, 2026 at 7:55 PM Guillermo Martínez Jiménez via
fpc-pascal  wrote:
>
> A few weeks ago I was looking on the Internet if there's a simpler way
> to convert a binary string (i.e. '00100101') to integer than using a
> loop and parsing it by hand.  On Reddit I found an answer that suggests
> to use sysutils.StrToInt preceding the string with character '%'.


>
> I know binary and octal strings aren't used often today but I think that
> the documentation should be updated.

The documentaion about val
(https://www.freepascal.org/docs-html/rtl/system/val.html) clearly
says it handles binary, hexadecimal and octal input.
and so does the docs about StToInt
(https://www.freepascal.org/docs-html/rtl/sysutils/strtoint.html).

-- 
Bart
___
fpc-pascal maillist  -  [email protected]
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal