Do subroutines return values only? Sorry for the wrong title! I currently have a subroutine which should return y like (the actual formula is a bit more complex): y=cos(t) When i call the subroutine and then make a do-loop to test y for different t, it gives 1 value only. Does the subroutine give a value to y or am I doing something else wrong? t doesn't have a value before the subroutine is called.