What's been said and if you first do LOW PortA.0 the TRIS bit will be cleared so that the pin (RA0 in this case) is an output. When you then do If PortA.0 = 1 you aren't reading the state of the pin since it's not set to be an input.