If you require separate global vars for multiple instances of a routine, you can use Frames.    See SpriteMeshEd(), 
::/Demo/Graphics/Pick3D.CC or Noise().