[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Hex constants (idle question)
- From: db@...
- Date: Thu, 11 Dec 2003 19:27:53 +1000
I believe there is a patch on the Wiki for string hex constants.
+++++++++++++++++++++++++++++++++
>I'd like my users to be able to type in hexadecimal (and possibly binary)
>constants in as painless a way as possible. Currently I have:
>
> n = htoi("c3")
>
>which of course works fine, but makes complex expressions less readable for an
>inexperienced user.
>Is there a simpler way? I thought of:
>
> n = hex.c3
>
>but it would work only for hex constants beginning with a letter. The
>alternative:
>
> n = const.h3c
>
>seems ugly and error-prone.
>Did I miss other possibilities?
>
> Enrico