Servo Motor in function
Yes, it is possible, and you've done it almost right. I made a minor correction in the toMove() function ("int" instead of "var"), and supplied the setup() function which you didn't show. It compiles without error. I didn't check it for correct operation as it looks like you had reduced your code to the minimum example necessary to demonstrate your question -- and thanks for that! Here is what I compiled:

#include &lt;Servo.h&gt;

#define SERVO1      9
#define SERVO2      10


/*****&lt; External and Global Declarations &gt;*****/
Servo s1, s2;
void toMove(Servo obj, int inPosition, int forPosition);


/*****&lt; Local Function Prototypes &gt;*****/


void toMove(Servo obj,int inPosition, int forPosition){
int i = 0;
  for(i = inPosition; i&lt;forPosition; i++){
    obj.write(i);
  }
}

void setup()
{
    s1.attach(SERVO1);
    s2.attach(SERVO2);
}


void loop() {
   toMove(s1, 0, 180);
   toMove(s2, 0, 90);
}