Hi Vasile,
Thanks for the update. I found something strange. Given the code below.
include 18f4550
var byte i =
0
if (i == 100)
then
_error "Is 100"
end if
When I compile this I get:
jal jalv25r6 (compiled Oct 29 2021)
generating p-code
16858 tokens, 151522 chars; 3221 lines; 3 files
generating PIC code pass 1
generating PIC code pass 2
0 data accesses checked, 0 errors
1 skips checked, 0 errors
writing result
d:\PIC\Compiler\Test\2021\ADC_in_array\Test.jal:6: "Is 100"
1 errors, 0 warnings
The terminal process "c:\jallib\compiler\jalv2_64.exe 'd:\PIC\Compiler\Test\2021\ADC_in_array\Test.jal', '-s', 'c:\jallib\lib'" terminated with exit code: 1.
Which is not correct. Same happens when you replace it with _warn but then it is generated as warning.
But when I have this program:
include 18f4550
var byte i =
0
if !defined(i)
then
_error "i is not defined"
end if
I get:
jal jalv25r6 (compiled Oct 29 2021)
generating p-code
16858 tokens, 151533 chars; 3221 lines; 3 files
generating PIC code pass 1
generating PIC code pass 2
0 data accesses checked, 0 errors
0 skips checked, 0 errors
writing result
Code area: 6 of 32768 used (bytes)
Data area: 1 of 2048 used
Software stack available: 2046 bytes
Hardware stack depth 0 of 31
0 errors, 0 warnings
Which is correct because when I change i to j the output is:
jal jalv25r6 (compiled Oct 29 2021)
generating p-code
16858 tokens, 151533 chars; 3221 lines; 3 files
generating PIC code pass 1
generating PIC code pass 2
0 data accesses checked, 0 errors
0 skips checked, 0 errors
writing result
d:\PIC\Compiler\Test\2021\ADC_in_array\Test.jal:6: "i is not defined"
1 errors, 0 warnings
The terminal process "c:\jallib\compiler\jalv2_64.exe 'd:\PIC\Compiler\Test\2021\ADC_in_array\Test.jal', '-s', 'c:\jallib\lib'" terminated with exit code: 1.
So not sure why this happens but is seems to be not OK.
Kind regards,
Rob