Select case...Just wondering....


Closed Thread
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425


    Did you find this post helpful? Yes | No

    Default

    To further the discussion, because I have never used select case before, can you do something like this:

    SELECT CASE x

    CASE IS < 21 led1

    CASE IS < 41 led2

    END SELECT

    I am used to something like this

    If x=1 then
    goto led1
    else
    goto led2
    endif


    Also, an OT question. How do you guys get the code to display in blue?

    Thanks,

    Chris

  2. #2
    skimask's Avatar
    skimask Guest


    Did you find this post helpful? Yes | No

    Default

    Quote Originally Posted by Christopher4187 View Post
    To further the discussion, because I have never used select case before, can you do something like this:

    SELECT CASE x
    CASE IS < 21 led1
    CASE IS < 41 led2
    END SELECT

    I am used to something like this

    If x=1 then
    goto led1
    else
    goto led2
    endif

    Chris
    Should work. If it doesn't, reverse the cases around a bit...

    SELECT CASE x
    CASE IS > 20
    GOTO LED1
    CASE IS > 0
    GOTO LED2
    END SELECT

    Sometimes it's all about the order things go in...

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. Write Onewire data toa I2C memory / read ASCI
    By Eugeniu in forum mel PIC BASIC Pro
    Replies: 67
    Last Post: - 16th November 2008, 19:19
  4. Crystalfontz LCD
    By jman12 in forum mel PIC BASIC Pro
    Replies: 9
    Last Post: - 9th February 2007, 15:04
  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