Mail Archives: djgpp/1997/05/10/02:46:34
In article <Pine DOT 3 DOT 89 DOT 9705081555 DOT A32279-0100000 AT alpha DOT hcst DOT com>,
Bryan Murphy <bryan AT hcst DOT com> posted:
>I have a sequence of assighments that follows like this:
>
>unsigned long long int millimeters = (unsigned long long int)-1;
[snip]
>Anyways, if I don't type cast centinal values when assigning them to
>long long int types, I get a warning telling me the value is out of
>range, yet the long long int receives the value fine. Any reason why
>this happens and what can I do to stop the warnings short of typecasting
>every big assignment?
Append a "ull" (Unsigned Long Long) to each of your numbers i.e.:
JohnsBirthdayRepeated = 198211101982111019821110ull;
[snip]
--
John Fremlin (dfremlin AT facstaff DOT wisc DOT edu)
(fremdh AT essex DOT ac DOT uk)
- Raw text -