How to compare floats and ints

int LightSensorA = 0;
LightSensorA = digitalRead(2);

Utterly pointless

int LightSensorA = digitalRead(2);

What can I do to better pass the global variable into the funtion?

Which variable?
Which function?