Re: SWITCH question
- Posted by Ekhnat0n Jan 07, 2018
- 2065 views
I tried to quote the routine, but it came up with the refarral iso the deconstrution.
5276 object make_atom(uintptr_t c) 5277 /* make a Euphoria atom from an unsigned C value */ 5278 { 5279 if (c <= (uintptr_t)MAXINT) 5280 return c; 5281 else 5282 return NewDouble((eudouble)c); 5283 }
We are dealing with a 32-bit value for MAXINT under certain circumstances and that is a different value from its 64-bit counterpart. But both of them are represented in C in a different way from Euphoria as well, if they are considered to be an INT. Robert used a 31-bit value, with the 32nd bit for ±-indication, C uses the 1 (or 2)-complement method.. I don't exactly remember.. it is (as I said before) a methodical issue as well as all other possible nasties.