[Gambas-user] Using shl and or in a mixed statement Causes error?

Brian G brian at westwoodsvcs.com
Sat Feb 19 01:19:42 CET 2022


A program with the following code report a strange error, Or perhaps I am using thing incorrectly. But the outcome of the statement is correct. Does Anyone have any Idea, why this produces the following error message/warning: 

The Error: 
Main : 11 : Integer and boolean mixed with `Or' operator 

The code: 
Public lAd As Long = 0 
Public bDa As Byte = 0 

Public Sub Main() 
Dim lTemp As Long = 1 
lAd = (CInt(bDa) Shl 8) Or lTemp 
End 

In A recent program I ended up with quite a lot of these errors! 

"Failure is the key to success; 
each mistake teaches us something" .. Morihei Ueshiba 
Brian G 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220218/5381b3cb/attachment-0001.htm>


More information about the User mailing list