Error compiling CRC code
Posted: 07 June 2008, 15:28 PM
The code shown below returns the error message
Code details aside, the 'Internal Error' is indicative of a compiler issue.
The three functional bits...
...all compile correctly if the other two are commented out.
-Don
Compiler wrote: CRCError.bas:9: Internal Error: no means to generate code for expression
Code: Select all
Sub Main()
Dim CRC as UnsignedInteger
Dim DataCount as Integer
Dim BufferQ(1 to 100) as Byte
Dim ReceivedCRC as UnsignedInteger
DataCount = 10
CRC = CRC16(BufferQ(1), DataCount, &H8005, &Hffff, zxCRCRefIn Or zxCRCRefOut)
'ReceivedCRC = MakeWord(BufferQ(DataCount+1), BufferQ(DataCount + 2))
If CRC <> ReceivedCRC Then
'Do some work
End If
End Sub
The three functional bits...
Code: Select all
CRC = CRC16(BufferQ(1), DataCount, &H8005, &Hffff, zxCRCRefIn Or zxCRCRefOut)
Code: Select all
ReceivedCRC = MakeWord(BufferQ(DataCount+1), BufferQ(DataCount + 2))
Code: Select all
If CRC <> ReceivedCRC Then
'Do some work
End If
-Don