wHAT IS mask() Instruction?

Hello sir,

I rigged up a circuit of 3 digit voltmeter with UNO as per the one sample program as per Link http://forum.arduino.cc/index.php?topic=233532.0
Circuit is working fine. But I want to understand following instruction –
void mask(int num, int aa, int bb, int cc, int dd, int ee, int ff, int gg)
because I could not find “ void mask()” any where in the arduino library.

I Request for earliest reply please .

Thanks and regards
Subramanya

It is there in the code you linked to.
The function just sets pins (turns on LED's) depending on the num needed.

void mask(int num, int aa, int bb, int cc, int dd, int ee, int ff, int gg)
{
  switch (num)
  {
    case 0 :
    digitalWrite(aa, HIGH);
    digitalWrite(bb, HIGH);
    digitalWrite(cc, HIGH);
    digitalWrite(dd, HIGH);
    digitalWrite(ee, HIGH);
    digitalWrite(ff, HIGH);
    digitalWrite(gg, LOW);
    break;
    
    case 1 :
    digitalWrite(aa, LOW);
    digitalWrite(bb, HIGH);
    digitalWrite(cc, HIGH);
    digitalWrite(dd, LOW);
    digitalWrite(ee, LOW);
    digitalWrite(ff, LOW);
    digitalWrite(gg, LOW);
    break;
    
    case 2 :
    digitalWrite(aa, HIGH);
    digitalWrite(bb, HIGH);
    digitalWrite(cc, LOW);
    digitalWrite(dd, HIGH);
    digitalWrite(ee, HIGH);
    digitalWrite(ff, LOW);
    digitalWrite(gg, HIGH);
    break;
    
    case 3 :
    digitalWrite(aa, HIGH);
    digitalWrite(bb, HIGH);
    digitalWrite(cc, HIGH);
    digitalWrite(dd, HIGH);
    digitalWrite(ee, LOW);
    digitalWrite(ff, LOW);
    digitalWrite(gg, HIGH);
    break;
    
    case 4 :
    digitalWrite(aa, LOW);
    digitalWrite(bb, HIGH);
    digitalWrite(cc, HIGH);
    digitalWrite(dd, LOW);
    digitalWrite(ee, LOW);
    digitalWrite(ff, HIGH);
    digitalWrite(gg, HIGH);
    break;
    
    case 5 :
    digitalWrite(aa, HIGH);
    digitalWrite(bb, LOW);
    digitalWrite(cc, HIGH);
    digitalWrite(dd, HIGH);
    digitalWrite(ee, LOW);
    digitalWrite(ff, HIGH);
    digitalWrite(gg, HIGH);
    break;
    
    case 6 :
    digitalWrite(aa, HIGH);
    digitalWrite(bb, LOW);
    digitalWrite(cc, HIGH);
    digitalWrite(dd, HIGH);
    digitalWrite(ee, HIGH);
    digitalWrite(ff, HIGH);
    digitalWrite(gg, HIGH);
    break;
    
    case 7 :
    digitalWrite(aa, HIGH);
    digitalWrite(bb, HIGH);
    digitalWrite(cc, HIGH);
    digitalWrite(dd, LOW);
    digitalWrite(ee, LOW);
    digitalWrite(ff, LOW);
    digitalWrite(gg, LOW);
    break;
    
    case 8 :
    digitalWrite(aa, HIGH);
    digitalWrite(bb, HIGH);
    digitalWrite(cc, HIGH);
    digitalWrite(dd, HIGH);
    digitalWrite(ee, HIGH);
    digitalWrite(ff, HIGH);
    digitalWrite(gg, HIGH);
    break;
    
    case 9 :
    digitalWrite(aa, HIGH);
    digitalWrite(bb, HIGH);
    digitalWrite(cc, HIGH);
    digitalWrite(dd, HIGH);
    digitalWrite(ee, LOW);
    digitalWrite(ff, HIGH);
    digitalWrite(gg, HIGH);
    break;
    
  }
}

The line you quoted is simply the start of the definition of a function called mask. If you don't understand functions in C++ it may be worth reading a good C++ tutorial. E.g. C++ Functions

Steve

The word "void" means that the function doesn't return a value.