Re: Rob printf problem.
- Posted by Robert Craig <rds at ATTCANADA.NET> Jan 08, 2000
- 458 views
Bernie Ryan writes: > Run the following in "C" ( I used both Borland and MSC ) > #include <stdio.h> > main() { > printf("%d\n", -1); > printf("%d\n", 0xffffffff); // this returns -1 > } > Then run the following in Euphoria > printf(1,"%d\n", -1) > printf(1,"%d\n", #FFFFFFFF) -- this does not return -1 In Euphoria, hex numbers are positive unless there's a minus sign in front. You can "correct" the C code by using %u (display an unsigned integer), instead of %d (display a signed integer). In Euphoria, you don't have to worry about signed vs. unsigned integers. %d simply means display an integer. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com