Jump to content


Photo

Cannot Get Program To Compile


1 reply to this topic

#1 NattyFido

NattyFido

    Newbrie

  • Members
  • 1 posts

Posted 16 April 2009 - 01:21 AM

I was very surprised to find that my first program with SourceBoost Basic compiled and ran with no problems, well done on making it very intuitive.

Now I am trying something a little more complex and I am stuck.
sub control_temp( temp1 as word, temp2 as word, t1 as word, t2 as word, t3 as word, t4 as word )
	if temp1 >= t1 then portc.6 = 1
	if temp1 <= t2 then portc.6 = 0
	if temp1 <= t3 then portc.7 = 1
	if temp1 >= t4 then portc.7 = 0
	end sub
None of these IF statements will compile! I have tried putting the comparison (temp1 >= t1) in brackets but still no luck.

#2 Reynard

Reynard

    Maniac

  • EstablishedMember
  • PipPipPipPip
  • 660 posts
  • Gender:Male
  • Location:Scotland
  • Interests:Archery - target and field

Posted 16 April 2009 - 10:25 AM

Don't forget to close your "If" statements with "End If".

Cheers

Reynard



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users