title: What is the difference between a function and a subroutine?
body: <p>What is the difference between a function and a subroutine? I was told that the difference between a function and a subroutine is as follows:</p>
  
  <p>A function takes parameters, works locally and does not alter any value or work with any value outside its scope (high cohesion). It also returns some value. A subroutine works directly with the values of the caller or code segment which invoked it and does not return values (low cohesion), i.e. branching some code to some other code in order to do some processing and come back. </p>
  
  <p>Is this true? Or is there no difference, just two terms to denote one?</p>