Query output pin mode

Hello everyone.

I am trying to query the status of an output pin.

in my setup:

pinMode(CENABLE, OUTPUT);

And in my loop:

if (CENABLE == HIGH){
                  lcd.print("ON ");           // Curtis On
                } else {
                  lcd.print("OFF ");           // Curtis Off
                }

However, this does not seem to be working the way I intended. Anyone know the proper syntax?

Thanks for the help.

if ( digitalRead( CENABLE ) == HIGH){

But, if it's an output pin, you should know whether you've set it HIGH or LOW.

dxw00d:
But, if it's an output pin, you should know whether you've set it HIGH or LOW.

that is true, however it gets set up high or low in a several level deep if statement, so I thought it would be easiest and most fool proof to just read the condition of the output.

This worked famously! Thank you!