Results 1 to 2 of 2

Thread: Compare Variable Sets: all in set 1 against all in set 2?

  1. #1
    Join Date
    Dec 2007
    Location
    Stranded in Sarasota Florida
    Posts
    75
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Question Compare Variable Sets: all in set 1 against all in set 2?

    I have two sets of 26 variables. I need to compare and match each variable in set 1 against each variable in set 2. Obviously set 1 var 1 won't automatically match set 2 var 1...otherwise I wouldn't need to do this.

    Any way I'm using alerts to visualize what is going on for me. I'll put this in to plain text though what I'm getting...
    ii00 =?= ce00
    ii10 =?= ce10
    ii20 =?= ce20
    ii30 =?= ce30
    ii40 =?= ce40
    ii50 =?= ce50


    ...and the desired comparison (if the range was limited to 0~2, and below would be the entire comparison of course then)...
    ii00 =?= ce00
    ii10 =?= ce00
    ii20 =?= ce00
    ii00 =?= ce10
    ii10 =?= ce10
    ii20 =?= ce10
    ii00 =?= ce20
    ii10 =?= ce20
    ii20 =?= ce20

    Suggestions for modifying my script please?

    Code:
    function fill_values()
    {
     for (var i=0; i<2; i++) //26
     {
     var the_selector = i;
     alert('ii' + the_selector + '0 =?= ' + 'ce' + i + '0');
     }
    }

  2. #2
    Join Date
    Dec 2007
    Location
    Stranded in Sarasota Florida
    Posts
    75
    Thanks
    7
    Thanked 2 Times in 2 Posts

    Default

    My answer to my question...

    Code:
    function fill_values(my_param)
    {
     for (var i=0; i<6; i++) //26
     {
     var the_selector = i;
     alert('ii' + the_selector + '0 =?= ' + 'ce' + my_param + '0');
     }
    }
    
    function fill_values_exec()
    {
     for (var i=0; i<3; i++) //26
     {
      fill_values(i++);
     }
    }

Bookmarks

Posting Permissions

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