<pre>function padLeft T,N,F  if F is empty then put space into F  put the length of T into L  if L >= N then get char 1 to N of T  else    get T    repeat with i = L to (N-1)      put F before it    end repeat  end if  return itend padLeft</pre>