Simplify the codes for some repeated actions by creating loops : <p>Here below are my codes performing data resetting for a series of ports of integer type. </p>

<pre><code>   //note function: void resetData(int pin);
   resetData(p00);
   resetData(p01);
   resetData(p02);
   resetData(p03);
   resetData(p04);
   resetData(p05);
   resetData(p06);
   resetData(p07);

   resetData(p10);
   resetData(p11);
   resetData(p12);
   resetData(p13);
   resetData(p14);
   resetData(p15);
   resetData(p16);
   resetData(p17);

   resetData(p50);
   resetData(p51);

resetData(p80);
resetData(p81);
resetData(p82);
resetData(p83);
resetData(p84);
resetData(p85);
resetData(p86);
resetData(p87);

resetData(p110);
resetData(p111);
resetData(p112);
resetData(p113);
resetData(p114);
resetData(p115);
resetData(p116);
resetData(p117);
</code></pre>

<p>In the above codes, there are different types of ports (as grouped together), and they are processed by <code>resetData</code>. Is there way to simplify these long list of code by creating some loops, without changing the definition of <code>resetData</code>? Thanks!</p>
