;EXTEN(NUMBER)
;  Purpose: Returns a four character string corresponding to the number provided
;	    (allows a convenient way of addressing a datafile in a loop)
;  Input: NUMBER (int): The (image) serial number 
;  Output: Four character string as the file extension correspondint to NUMBER
;  History: I. Zayer, LPARL, May 1993

function exten,num

  num=strtrim(string(num),2)
  ext='0000' & strput,ext,num,4-strlen(num)
  return,ext

end