Pinmode needed??

Hi all

In the past when using arduino's, I always made sure to use pinMode in my setup and define the pins as either input or output. Unfortunately life caught up and i wasnt able to play around with my arduinos for a while. I started again a couple of months ago but as im sure most of you know , if you dont do something for a while, you tend to forget a few things. Anyway since i restarted my coding with Arduino's I have been forgetting to use pinMode completely. This has been working without any issues. I did a search online to see if the IDE has been changed to detect if the code is using the pins as either inputs / outputs and set them as required automatically but i cant find any mention of this. What im wondering is, have i just been lucky so far or will this have an effect with certain functions along the line?

The default mode is INPUT so you don't need to use pinMode(pin, INPUT) unless you previously set the pin to a different mode. When you do digitalWrite(pin, HIGH) to a pin that's in INPUT mode it turns on the internal pull-up resistor, which could appear as if you had the pin in OUTPUT mode and had set it HIGH.

So the answer is: No, the IDE has not changed.

Thanks for the reply:-)