Problem getting switch info into FOR..NEXT Start


Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    Sweden
    Posts
    3,612


    Did you find this post helpful? Yes | No

    Default

    Hi,
    Not exactly sure what you want to do here but how about
    Code:
    myValue VAR BYTE
     
    myValue = PortB
    For B0 = myValue to 0 Step -1
    ....
    ....
    Next
    Or probably even
    Code:
    For B0 = PortB to 0 Step -1
    ....
    ....
    Next
    /Henrik.

  2. #2
    Join Date
    Apr 2009
    Posts
    18


    Did you find this post helpful? Yes | No

    Red face I couldn't see the forest for the trees!

    Quote Originally Posted by HenrikOlsson View Post
    Hi,
    Not exactly sure what you want to do here but how about
    Code:
    myValue VAR BYTE
     
    myValue = PortB
    For B0 = myValue to 0 Step -1
    ....
    ....
    Next
    Or probably even
    Code:
    For B0 = PortB to 0 Step -1
    ....
    ....
    Next
    /Henrik.
    Thanks Henrik! I feel like an IDIOT!
    "For B0 = PortB to 0 Step -1"
    Works just fine!

Members who have read this thread : 0

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

Posting Permissions

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