oneofthem dixit: >If you shouldn't use signed ints, then how do store negative numbers?
Basically, if you have something negative, you store it either in a signed int, or in a typedef union { mksh_ari_t i; mksh_uari_t u; } mksh_ari_u; (where ari_t and uari_t are the signed and unsigned ints, respectively), and do all arithmetics on it by using the unsigned access, and do comparisons (other than == and !=) and printing using the signed access. This is legal in POSIX, and in C as long as the system uses two’s complement. I was told that people arguing against this have yet failed to show a workable C implementation on a system not using two’s complement, so… fine. bye, //mirabilos -- 13:37⎜«Natureshadow» Deep inside, I hate mirabilos. I mean, he's a good guy. But he's always right! In every fsckin' situation, he's right. Even with his deeply perverted taste in software and borked ambition towards broken OSes - in the end, he's damn right about it :(! […] works in mksh