I wouldn't call the GPIO registers a "setting" (though it's really no different than any other register). It is the port register which is connected to the actual I/O pins.

Write to GPIO and the bits will appear on the port pins configured as outputs. Read from GPIO and you'll get the state of the register. The state of each individual bit will properly reflect the state logic state of the actual pin provided that the pin IS set to digital, it IS set to input and the voltage is either less than VIL (for a logic zero) or more than VIH (for a logic one).

In other words, if the voltage on GPIO.0 is less than VIL myVAR = GPIO.0 will be 0 and if the voltage is higher than VIH myVAR = GPIO.0 will be 1. If the voltage is somewhere in between VIL and VIH the result is unspecified.

Your original problem was that the pin was not set to digital and as the datasheet says: I/O pins configured as analog inputs always read ‘0’.

/Henrik.