Re: Need help on pic connect 4
This line in your code ...
Code:
if (b.0[rows]=0)then fall=0 : goto main
is the same as...
Code:
if (b.0[rows]=0)then fall=0
goto main
you probably need this...
Code:
if (b.0[rows]=0)then
fall=0
goto main
endif
That way the "goto main" will only be executed if the preceding IF statement is true
from the PBP manual...
4.13. Multi-statement Lines
In order to allow more compact programs and logical grouping of related commands, PBP supports the use of the colon
":" to separate statements placed on the same line. Thus, the following two examples are equivalent:
W2 = W0
W0 = W1
W1 = W2
is the same as:
W2 = W0 : W0 = W1 : W1 = W2
This does not, however, change the size of the generated code.
Last edited by Heckler; - 16th November 2011 at 20:12.
Dwight
These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.
Bookmarks