Page 1 of 1

Interrupt Example Compile Error

Posted: Sun Oct 28, 2012 1:52 am
by Goey
With a Basic Chip, I tried to load the example from the Manual page 272 and get the following:

=============================
END FUNCTION
-ERROR C:/Users/BILL/Desktop/BASFILRS/123.bas: 7: Expected LOOP, found FUNCTION

END FUNCTION
-First ERROR at line :7
=============================

Is there a problem with the example or am i missing something ?

Re: Interrupt Example Compile Error

Posted: Sun Oct 28, 2012 3:46 pm
by brucee
The example has an error, it's been fixed. It was missing the LOOP for the WHILE

Code: Select all

FUNCTION ReadBit
  WHILE IN(1)=0 ' wait for clock to go high 
  LOOP
  RETURN IN(2) AND 1
END FUNCTION