I get errormessages, when using "#option Explicit" and bitwise operations in a Sub or Function.
Other maths do not generate errormessages.
#chip 12f1501, 1
#option Explicit
TestByte (3)
Sub TestByte(MyByte As Byte)
MyByte = MyByte + 1 ; No Error while compiling
MyByte = MyByte | 1 ; Error: Variable MYBYTE was not explicitly declared
MyByte = MyByte # 1 ; Error: Variable MYBYTE was not explicitly declared
MyByte = MyByte & 1 ; Error: Variable MYBYTE was not explicitly declared
If MyByte.0 Then ; Error: Variable MYBYTE was not explicitly declared
End If
End Sub
The workaround is, to "Dim" the variable in the main program, but would be nice to avoid that.
GCB version is 0.96.00 2016-12-14
Frank
Last edit: Frank Steinberg 2017-01-28
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Can you check using the attachment? I get the error on one line. Can you confirm this is the same on the same line. I need this verification to ensure we are fixing same issue.
Me too, but if I comment out the "If ... End If" lines, I get the error at the line with the "|" (Or).
If I comment out this, the next line causes the error and so on.
Frank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi,
I get errormessages, when using "#option Explicit" and bitwise operations in a Sub or Function.
Other maths do not generate errormessages.
The workaround is, to "Dim" the variable in the main program, but would be nice to avoid that.
GCB version is 0.96.00 2016-12-14
Frank
Last edit: Frank Steinberg 2017-01-28
@Frank,
Can you check using the attachment? I get the error on one line. Can you confirm this is the same on the same line. I need this verification to ensure we are fixing same issue.
Thanks
Me too, but if I comment out the "If ... End If" lines, I get the error at the line with the "|" (Or).
If I comment out this, the next line causes the error and so on.
Frank
Thanks. I have this on the 'to do' list. Use the workaround until resolved.
Fixed in release v0.97.00 or later