Hi kctan,
Nothing wrong with the first example. Except there's no GOTO at the end to form a loop. (but you probably just missed it with the cut&paste) You might want to try it on a real chip, instead of a simulator.
However, in the second example.The "while" will never execute, because x = 10 will never be True.Code:x=0 while porta.0 =1 and x = 10 portb.0 = 1 x=x+1 wend
Also, the code shown would be for PicBasic Pro, Plain PicBasic doesn't have a "while" command.
Bookmarks