function str_format,variable,format

if not exist(variable) then return,''
if is_blank(format) then sform='(f15.3)' else sform=format
return,string(variable,format=sform)

end