[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] Introduction
Jason Vinson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Geoffrey wrote:
>
> | ... The dream job! You're confused though, it's the Java that is
> | annoying you. I mean come on, try subtracting a character from a
> | character in order to get the numeric difference. C ? yes, Java, I
> | don't think so..
> |
> Maybe i'm misunderstanding the problem, but are you saying that this
> is annoying:
>
> Character.getNumericValue('z')-Character.getNumericValue('a')
>
> Lengthy yes... but doable (and not that hard!)
No, character - character = numeric:
intval = '5' - '2';
You cheated, and did the conversion first as well as twice. :)
--
Until later, Geoffrey