Syntax Question

Status
Not open for further replies.

Gripporillat

Well-known member
Hi everybody!

Would someone please explain the ": Bounce..." part to me? I don't get it...

Code:
MIDIbutton::MIDIbutton(int p, byte num, byte mod) : Bounce(p, 10), Flicker(0, 0){
  pinMode(p, INPUT_PULLUP);
  inputType = 0; //button
  number = num;
  mode = mod; 
  state = false;
};

Thanks in advance!
 
Last edited:
everything after the colon is a default initializer, in this case it’s instantiating a bounce object for that pin that will be used by the MIDIbutton class, of 10ms
 
Status
Not open for further replies.
Back
Top