function padzero3, n ; Bo Milvang-Jensen (milvang@astro.ku.dk) ; For the RelViz Web exhibition, June 1996 ; Last rev.: 07-Jun-1996 ; What is does: padzero3(1) = 001, padzero3(11) = 011, padzero3(111) = 111 ; Perhaps this is below the threshold of what one should put in a ; separate function ;-) if (n lt 10) then begin pad = '00' end else if (n lt 100) then begin pad = '0' end else begin pad = '' end foo = pad+str(n) ; Note: "str" is a function written by Aake Nordlund return, foo end