Need help on pic connect 4


Results 1 to 2 of 2

Threaded View

  1. #2
    Join Date
    Oct 2009
    Location
    Utah, USA
    Posts
    427


    Did you find this post helpful? Yes | No

    Default 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 21:12.
    Dwight
    These PIC's are like intricate puzzles just waiting for one to discover their secrets and MASTER their capabilities.

Members who have read this thread : 0

You do not have permission to view the list of names.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts