Can analog pins be used as digital?

well, my understanding is, these precautions mainly apply if you're flipping between analog and digital modes within the same sketch - which is fairly unlikely in most practical circuits you would build on arduino. The precaution is you need to set the pin low before swirching to input mode for analogRead to avoid switching on the ATMEGA328s internal pullup resistors. i have never found this t an issue when doing purely digital reads on the pin in the normal way you would read say a switch.

Caveat of course is this applies to the standard Arduino platform.