Need help with matching


Closed Thread
Results 1 to 3 of 3
  1. #1
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    425

    Default Need help with matching

    Hi,

    I have a question and I hope I relay it correctly. What I am trying to do is input a code, lets say 3,4,5,6. Each number gets a specific position and that would look like key1=3, key2=4...... So, here I have my code of key1, key2, key3 and key4 which is 3,4,5,6.

    I know how to check one number but I don't know how to check four numbers as a group. In other words, 3,4,5,6 checks agains 3,4,5,6. Any suggestions?

    Thanks,

    Chris

  2. #2
    Join Date
    Feb 2003
    Location
    Salt Lake City, Utah USA
    Posts
    517


    Did you find this post helpful? Yes | No

    Smile

    Code:
    IF key1=3 THEN
    	IF key2=4 THEN
    		IF key3=5 THEN
    			IF key4 = 6 THEN CodeRight
    		ENDIF
    	ENDIF
    ENDIF
    ' Continue on here – code did not match
    
    
    
    
    CodeRight:	' Subroutine, jump to here – code matches
    OR

    Code:
    IF (key1=3) AND (key2=4) AND (key3 = 5) AND (key4=6) THEN CodeRight
    Paul Borgmeier
    Salt Lake City, UT
    USA
    __________________

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


    Did you find this post helpful? Yes | No

    Default

    Thanks for the reply Paul, I will give this a shot today!

Similar Threads

  1. Replies: 1
    Last Post: - 28th January 2010, 22:15
  2. Pulse count matching
    By RodSTAR in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 22nd April 2008, 03:35
  3. Replies: 1
    Last Post: - 5th July 2007, 20:16
  4. Matching PIC memory and program size?
    By manxman in forum mel PIC BASIC Pro
    Replies: 8
    Last Post: - 9th August 2006, 08:02
  5. Image Matching Modules
    By sayzer in forum Off Topic
    Replies: 0
    Last Post: - 4th March 2006, 11:59

Members who have read this thread : 1

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