Changing the user's settings is not a really good programming practice unless you can guarantee that no matter what the user does during program execution, their settings will be returned to the state prior to running the program. In your case, if the user presses the [On] key, program execution is halted and there is a chance the user's angle settings do not get restored. Instead, use the angle setting to test whether or not your own program needs to do angle conversion. If your code is written with the assumption that radians are used, and the user's calculator happens to be in degrees, then
GETANGLE(a)
BEGIN
IF HAngle THEN
a:=a/PI*180; // angle was assumed to be in radians when programmed; convert to degrees
END;
RETURN(a);
END;
So now you can just do SIN(GETANGLE( blah )) and always assume that the angle is in radians (while you program). Whether or not the user's settings is in radians won't affect the outcome as GETANGLE() will convert accordingly.