Calling a function or subroutine in easyC

Our team using EasyC for programming. We would like to change a variables value when a button on the controller is pressed. It could be done either directly when the button is pressed or the button press could call user function to change the value. I am just not sure on what value is being returned when the get joystick digital function is used. The help that is provided by EasyC is very vague and few examples are given. So any help on how to perform this task would be appreciated.