Advertisement
DraKiNs

[INC] Manager Arrays (Gerenciar Arrays)

Jul 1st, 2011
301
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pawn 0.66 KB | None | 0 0
  1. /*----------------------------------------
  2.  *
  3.  *  Manager Arrays (Gerenciar Arrays)
  4.  *   Criado por DraKiNs (by DraKiNs)
  5.  *   (c) Copyright 2011, [iPs]TeaM
  6.  *
  7. /*-------------------------------------- */
  8.  
  9. iAddIterator(var[], iter)
  10. {
  11.     for(new i; i < sizeof(var) - 1; ++i) {
  12.         if(!(var[i] == -1)) continue;
  13.  
  14.         var[i + 1] = var[i],var[i] = iter;
  15.         break;
  16.     }
  17.     return true;
  18. }
  19.  
  20.  
  21. iDelIterator(var[],iter)
  22. {
  23.     for(new i; i < sizeof(var) - 1; ++i) {
  24.         while(var[++i] == iter && i < sizeof(var) - 1) {
  25.             var[ i ] ^= var[i+1],var[i+1] ^= var[ i ],var[ i ] ^= var[i+1];
  26.         }
  27.         i-=1;
  28.     }
  29.     return true;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement