problems with IF formula RESOLVED

i get this error:

LDR_Simple.ino:18: error: 'LDRValue' cannot be used as a function

if (LDRValue()==1)Serial.println ("On");

^

exit status 1
'LDRValue' cannot be used as a function

my code:

int LDRPWR = 16;
int LDRPin = 5; // select the input pin for LDR
int LDRValue = 0; // variable to store the value coming from the sensor
void setup() {
pinMode(LDRPWR, OUTPUT);
Serial.begin(9600); //sets serial port for communication
digitalWrite(LDRPWR, LOW);
}
void loop() {
//LDRValue = analogRead(LDRPin); // read the value from the sensor
digitalWrite(LDRPWR, HIGH); // sets the LDR on
delay(1000); // waits for a second
LDRValue = digitalRead(LDRPin); // read the value from the sensor
digitalWrite(LDRPWR, LOW); // sets the LDR off
// delay(1000); // waits for a second

Serial.println(LDRValue); //prints the values coming from the sensor on the screen
if (LDRValue()==1)Serial.println ("On");
}

(deleted)

By adding the parentheses to LDRValue, you are trying to evaluate it as a function. This is of course not possible, because it's a variable, not a function. Just delete the parentheses, and it should work.

Please remember to use [code][code] tags when posting code or error messages.

Pieter

Its possible to evaluate a variable as a function of course, but only if its of function type - an int
typed variable cannot contain function references, only integers.

great thanks