Interrupt Example Compile Error

Questions about the BASICtools and MakeItC
Post Reply
Goey
Posts: 6
Joined: Fri Oct 19, 2012 12:48 pm
Location: Austin,TX

Interrupt Example Compile Error

Post 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 ?



brucee
Site Admin
Posts: 33
Joined: Thu Dec 18, 2008 8:45 pm

Re: Interrupt Example Compile Error

Post 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

Post Reply