"WAIT" modifier with multiple choices - how to?


Results 1 to 12 of 12

Threaded View

  1. #8
    Join Date
    May 2013
    Location
    australia
    Posts
    2,728


    Did you find this post helpful? Yes | No

    Default Re: "WAIT" modifier with multiple choices - how to?

    that will do it roger


    this might be a little bit faster as only one value of instring[0] can ever be true at any one time


    Code:
    select case InString[0]
        case = 65 ;    ps you can use case = "A" to make it more readable 
            if InString[1] = 65 then
                if InString[2] = 65 then
                    Blinks = 1
                ENDIF    
            ENDIF    
       case 66  
            if InString[1] = 66 then
                if InString[2] = 66 then
                    Blinks = 2
                ENDIF    
            ENDIF    
       case 67 
            if InString[1] = 67 then
                if InString[2] = 67 then
                    Blinks = 3
                ENDIF    
            ENDIF    
    END select
    Last edited by richard; - 2nd January 2022 at 21:58.
    Warning I'm not a teacher

Similar Threads

  1. How to do the "SerIN" and "SerOut " for the usb ?
    By vicce67 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 13th March 2015, 02:01
  2. Replies: 0
    Last Post: - 14th November 2013, 03:32
  3. Replies: 3
    Last Post: - 15th October 2012, 08:06
  4. Multiple "AND"'s in select case?
    By polymer52 in forum mel PIC BASIC Pro
    Replies: 4
    Last Post: - 1st January 2010, 19:10
  5. Replies: 1
    Last Post: - 16th February 2005, 20:05

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