Case


Closed Thread
Results 1 to 7 of 7

Thread: Case

Hybrid View

  1. #1
    Join Date
    Feb 2006
    Posts
    89


    Did you find this post helpful? Yes | No

    Default Here you go

    Select case dtmf ' dtmf is the variable that I am comparing the cases to
    case "1" 'this says if dtmf = "1" then
    portc = %10010111 'do this
    case "2"
    portc = %10011001
    case "3"
    portc = %10011011
    case "4"
    portc = %10011101
    case "5"
    portc = %10011111
    case "6"
    portc = %10100001
    case "7"
    portc = %10100011
    case "8"
    portc = %10100101
    case "9"
    portc = %10100111
    case "0"
    portc = %10101001
    end select ' gets you out of the case statement like endif

    This is the general gist of it. I too just learned how this thing works.

    Travin

  2. #2


    Did you find this post helpful? Yes | No

    Talking Case

    Hello,

    Thank you to all for their answers, I will make the tests and then I inform them.

    Greetings

    Leonard




    Quote Originally Posted by Travin77
    Select case dtmf ' dtmf is the variable that I am comparing the cases to
    case "1" 'this says if dtmf = "1" then
    portc = %10010111 'do this
    case "2"
    portc = %10011001
    case "3"
    portc = %10011011
    case "4"
    portc = %10011101
    case "5"
    portc = %10011111
    case "6"
    portc = %10100001
    case "7"
    portc = %10100011
    case "8"
    portc = %10100101
    case "9"
    portc = %10100111
    case "0"
    portc = %10101001
    end select ' gets you out of the case statement like endif

    This is the general gist of it. I too just learned how this thing works.

    Travin

Similar Threads

  1. Using Nokia LCD
    By BobP in forum mel PIC BASIC Pro
    Replies: 300
    Last Post: - 3rd May 2018, 04:47
  2. Sony SIRC IR Issue
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 10
    Last Post: - 8th August 2015, 08:10
  3. Crystalfontz LCD
    By jman12 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th February 2007, 15:04
  4. Using LEDs as light sensors
    By skimask in forum Code Examples
    Replies: 3
    Last Post: - 30th December 2006, 22:19
  5. Interrupt/timer not really interrupting...
    By Tom Gonser in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd May 2005, 22: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