Touch Sensor Code

Just wondering:
Can the input from an NXT touch sensor only be a boolean? If it can be anything else, show the code!

The NXT touch sensor only has 2 states, on or off. So no, boolean only.