Passing I/O functions to a class.

Example:

void displaySomething (HardwareSerial & whichPort)
  {
  whichPort.println ("Hello world.");  
  }

void setup ()
  {
  Serial.begin (115200);
  displaySomething (Serial);
  }  // end of setup

void loop () { }