Hi Kyle, If you compile the few lines of code below (with -no-codegen), it hits the _error statement while I would expect it doesn't. If you change timer0_div from var to const, it works as expected.
I could imagine this is actual illegal use of _error, but is does seem to work of 18f samples for timer0_poll_interval, but not for the 16f ones. An other thing: is there a way to get more details on the actual values used in calculations with constants? It took me a lot of time to derive the issue above from the orignal code (var dword timer0_div = (target_clock / 4 / overflow_rate) - 1)... Joep <code> var dword timer0_div = 1000 if (timer0_div > 65535) then _error "requested overflow rate is too low" end if </code> <compiler_output> "/cygdrive/c/jallib/compiler/jalv2.exe" jallib.jal -no-codegen -Wall -Wno-directives -long-start -s `/usr/bin/find /cygdrive/c/jallib/include /cygdrive/c/jallib/test -type d | perl inc.pl` jal 2.4n (compiled Jun 2 2010) generating p-code 0 errors, 0 warnings 17 tokens, 1697 chars; 78 lines; 0 files writing result jallib.jal:78: "requested overflow rate is too low" make: *** [all] Error 1 </compiler_output> -- You received this message because you are subscribed to the Google Groups "jallib" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/jallib?hl=en.
