Advertisement
Guest User

Untitled

a guest
Jun 2nd, 2013
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. var test_string = "1^^0^^0.000^^0^^0.0^^0.0^^0^^0^^0.0000^^0^^0^^0^^1^^2^^47^^1000^^";
  2. var good_array = [ "1", "0", "0.000", "0", "0.0", "0.0", "0", "0", "0.0000", "0", "0", "0", "1", "2", "47", "1000", ""]
  3. var test_count = 0;
  4. var test_array = new Array(20);
  5. var bad_split_count = new Array();
  6. var bad_split_time = new Array();
  7.  
  8. function split_test ()
  9. {
  10.  
  11. test_array = test_string.split('^^');
  12.  
  13. var i;
  14. for (i = 0; i < 16; i++)
  15. {
  16. if (test_array[i] === good_array[i])
  17. {
  18. var good_item = true;
  19. }
  20. else
  21. {
  22. var d = new Date()
  23. bad_split_time.push(d);
  24. bad_split_count.push(test_count);
  25. break;
  26. }
  27. }
  28.  
  29. test_count++;
  30.  
  31. setTimeout(split_test, 5);
  32. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement