10 bit AtoD returning integers from 0 to 1023.
Read Analog Input
There is no need to set the pin up as an analog input, just start reading it:
int MyAnalogValue = analogRead(A3); //Read 10-bit (0 to 1023) analog input value (causes stall for approx 100uS)
Setting The Analog Reference Voltage
Use the analogReference() function;
DEFAULT: the default analog reference of 5 volts (on 5V Arduino boards) or 3.3 volts (on 3.3V Arduino boards)
INTERNAL: an built-in reference, equal to 1.1 volts on the ATmega168 or ATmega328 and 2.56 volts on the ATmega8 (not available on the Arduino Mega)
INTERNAL1V1: a built-in 1.1V reference (Arduino Mega only)
INTERNAL2V56: a built-in 2.56V reference (Arduino Mega only)
EXTERNAL: the voltage applied to the AREF pin (0 to 5V only) is used as the reference.
Using Analog Pins as GPIO
The analog pins also have all the functionality of general purpose input/output (GPIO) pins (the same as digital pins 0 – 13).
Use the aliases A0 (for analog input 0), A1, etc. E.g this would set analog pin 0 to an output, and to set it HIGH:
Arduino Due, Zero and MKR Family
Use analogReadResolution() to set the resolution you want to use.