how to compliment a digital pin

You could tell it how nice it is looking today :wink:

(sp. "complement")

The language is not "Arduino", it is C/C++, and the usual language rules apply, and there are lots of ways of skinning that cat, depending on context and speed required. digitalWrite (myPin, ~digitalRead (myPin)); might be one of them.