I have been writing code for 28X for many days with pinnsc (sucessfully) in code. Just after I wrote another 20 lines or so (mainly a Select Case Statement), I get a "Compile Error.. error in this line " (see >1>> below for position). I commented out the "& %00001111" bit just as a test, didn't help. The next Subroutine still has it as it once worked - it didn't like that either.
If I comment out all references to reading from pinsc, it doesn't mind the "Let pinsc = xxx" but picks on the If statement (see >2>> below)
I suspect there is a problem somewhere, but compiler/editor isn't helping. How can I tell, and why is compiler complaining? There sounds like a bug in the compiler to if it can't see the real problem.
Additional Information:
I have just openned older files which once compiled (and loaded and ran) now giving me the same error at similar places (pinsc). I have restarted Editor, and can confirm it is set to 256 Gosubs (had a problem with this giving wierd errors previously).
Thanks,
Barrington
Code:
ReadDevice: ' 2 parameters required- AddrNib & DataNib
Let outpins = AddrNib ' select device
>1>> Let DataNib = pinsc '& %00001111 ' read back the low nibble
Let outpins = 0 ' deselect device
Return
'------------------------------------------------------
ReadSwitch: ' 2 parameters required- AddrNib & DataNib
Let outpins = AddrNib ' select device
Let DataNib = pinsc & %00001111 ' read back the low nibble
Let outpins = 0 ' deselect device
Let DataNib = 255 - DataNib ' Logic for switches is upside down (active LOW with PUPs)
Let DataNib = DataNib & %00001111
Return
Code:
WriteDevice: ' 2 parameters required- AddrNib, DataNib, DTMFDelay (0 for anything but DTMF Gen)
Let outpins = AddrNib' select device
let dirsc = %00001111 ' low nibble (Data Buss) as Inputs
Let pinsc = DataNib ' send 4 bits to I/O pins as OP.
>2>> If AddrNib = DTMFGen
Pause DTMFDelay
EndIf
Let outpins = 0 ' deselect device
let dirsc = %00000000 ' low nibble (Data Buss) as Inputs
Return
Additional Information:
I have just openned older files which once compiled (and loaded and ran) now giving me the same error at similar places (pinsc). I have restarted Editor, and can confirm it is set to 256 Gosubs (had a problem with this giving wierd errors previously).
Thanks,
Barrington
Last edited: