analog pins as digital??

A question I've been wondering about and not sure how to ask, but there are digital pins 0 thru 13, and analog pins 0 thru 5 - the IDE knows which is which by the way they are addressed as "digitalRead" digitalWrite, or analogRead. BUT I've read the analog pins can be used as digital pins - I've been wondering how does the IDE know then which is which?

I just read in a different thread where Grump_Mike says:

The analogue pins are for analogue input only not analogue output. You can use them like any other pin by referring to them as pins 14 to 18. They can be a digital input or a digital output.

Does this mean in order to use the analog pins as digital, they would be referred to as pins 14 thru 18... i.e. if I wished to use analog pin #3 as a digital, I would refer to it as pin 17 while still using analog pins 0, 1, &2, then skip pin 3, for analog pin 4 & 5 because analog pin #3 has been declared as ditigal pin #17? OR would analog pin #3 become ditial pin #14 as the next in line?

Thanks to all for any help,

Ken H>

It will be digital pin 17. Not sure if that changes teh state of all the analog pins or not.

Thanks for the info Digimike - When I read that info it just caught me by surprise - I had not though about it before, but that does help explain how the IDE knows pin numbers.

Ken H>