Input pullup

I went through most of the question related to internal pull ups but i couldn't find the answer. I want to use pin 0 and 1 (though they are analog input) as just digital input with pulls ups but i keep getting this error :

arduino_sketch.cpp: In function 'void setup()':
arduino_sketch:24: error: 'INPUT_PULLUP' was not declared in this scope

My setup code :

void setup()
{
    pinMode(outPin, OUTPUT); // sets the digital pin as output
    pinMode(rtPin,OUTPUT);
    pinMode(ltPin,OUTPUT);
    pinMode(enable,OUTPUT);
    
    pinMode(upperLimit, INPUT_PULLUP); // INTERNAL pullup
    pinMode(lowerLimit, INPUT_PULLUP);
    
    
    Serial.begin(9600);
    Serial.flush();
    
    digitalWrite(outPin, 1); // show initilization is done
    delay(100);
    digitalWrite(outPin, 0);
    delay(100);
    digitalWrite(outPin, 1);
    delay(100);
    digitalWrite(outPin, 0);
    delay(100);
    motorEn(1);
    while(digitalRead(upperLimit) || digitalRead(lowerLimit)){
      motor(50); // brring it down
    }
      motorEn(0);
  
}

I am using Duemilanove. and when i write 'INPUT_PULLUP' it doesn't gets highlighted in blue like when its gets when I write 'INPUT' or 'OUTPUT'. What might be the reason?

define (or sobstitute) INPUT_PULLUP with LOW

Wait, don't you want it HIGH? it is PULL UP, not DOWN

if you want pullup, then HIGH, if you don't want id, then LOW

lesto :

But i want to initialize this pin as input :astonished:

And how does defining a pin 'LOW' means that it is input?

HazardsMind :

yes i want it to be pulled up. But i get errors. Any ideas why?

Does this version of arduino compiler( i guess) has error? and its really confusing. You assign high and low when you want to give OUTPUT to the pin, right?

Which IDE version are you using?

You guys are missing the point and what the OP is asking about. At some arduino IDE version (1.0.1) there was an enhancement added to the pinMode function that allows one to define a input pin and set it's internal pull-up resistor if desired:

As of Arduino 1.0.1, it is possible to enable the internal pullup resistors with the mode INPUT_PULLUP. Additionally, the INPUT mode explicitly disables the internal pullups.

So what version of the Arduino IDE are you compiling the code under?

Lefty

its 1.0. how does that differs? I mean...anyways i am going to download the latest version and tell you guys what result i get.

its 1.0. how does that differs?

I'm pretty sure the feature isn't present in 1.0

INPUT_PULLUP was introduced in 1.0.1. Prior that, you set the pinMode() to INPUT, and used digitalWrite() to set it to HIGH to turn the pullups on.