...even simpler example: #include <conio.h> void main() { int number = 100; int div = 10000; cprintf("%i / %i = %i\n", number, div, number / div); } ...prints "100 / 10000 = 6" Johan On Sun, Feb 5, 2012 at 12:22 AM, Johan Kotlinski <kotlinski@gmail.com> wrote: > #include <assert.h> > > void test(unsigned int div, unsigned int number) { > assert(number / div == 0); // This one fails. > } > > void main() { > assert(100 / 10000 == 0); // This one does not fail. > test(10000, 100); > } > > Cheers, > Johan ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Sun Feb 5 00:42:19 2012
This archive was generated by hypermail 2.1.8 : 2012-02-05 00:42:22 CET