Declaration order causes inconsistency in expression.

7 views
Skip to first unread message

Leonardo Hirokazu De Souza Hamada

unread,
Aug 24, 2021, 9:15:02 AM8/24/21
to jallist
Hi, I assume there isn't a bug report on this yet. I don’t think I’ve seen on the bug entry list, so here it goes. I've stepped on the following issue on the code below:

var word cond = 123
var byte key = 16
if (0 == key) | (0 == cond) then
     print_string(serial_hw_data, "Shouldn't print.\r\n")
end if

If the word type variable is declared before the byte variable the if condition is satisfied, which is unexpected for the values given initially. (I'm using a 18f4620)

; This is OK, only the variable declaration order differ.
;var byte key = 16
;var word cond = 123
;if (0 == key) | (0 == cond) then
; print_string(serial_hw_data, "Shouldn't print.\r\n")
;end if

Best regards,

Leonardo

Rob CJ

unread,
Aug 24, 2021, 2:18:07 PM8/24/21
to jal...@googlegroups.com
Hi Leonardo,

Very surprising to see the bugs that you discover since they where not discoved before. I registered your issue under:

As said I will have a look at it later but currently I am working on an improvement of the JAL USB driver (if I will manage).

Kind regards,

Rob


Van: 'Leonardo Hirokazu De Souza Hamada' via jallist <jal...@googlegroups.com>
Verzonden: dinsdag 24 augustus 2021 15:15
Aan: jallist <jal...@googlegroups.com>
Onderwerp: [jallist] Declaration order causes inconsistency in expression.
 
--
You received this message because you are subscribed to the Google Groups "jallist" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jallist+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jallist/0edfdd41-8e06-427b-804e-75ae71dc322fn%40googlegroups.com.

rob...@hotmail.com

unread,
Sep 5, 2021, 3:01:33 AM9/5/21
to jallist
Hi Leonardo,

I think I fixed this issue but requires some more testing. If it works OK I first want to look at the other issue you reported about the calculation in the SD Word before adding the new compiler version to the bee-package.

Kind regards,

Rob

Op dinsdag 24 augustus 2021 om 20:18:07 UTC+2 schreef rob...@hotmail.com:
Reply all
Reply to author
Forward
0 new messages