************************************************************************
*
*  Tests GrADS "math_format" function
*
*  See post to GrADS Listserv on 1/15/08
*  by Robert F Esswein <esswein@CLIO.ARC.NASA.GOV>
*
************************************************************************

function test_math_format

num = 5
say 'math_format("%02.0g",' num ') = ' math_format("%02.0g",num)
say 'math_format("%02.1g",' num ') = ' math_format("%02.1g",num)
say 'math_format("%02.2g",' num ') = ' math_format("%02.2g",num)
say 'math_format("%2.0g",' num ') = ' math_format("%2.0g",num)
say 'math_format("%03.2d",' num ') = ' math_format("%03.2d",num)
num = 5.0
say 'math_format("%02.0g",' num ') = ' math_format("%02.0g",num)
say 'math_format("%02.1g",' num ') = ' math_format("%02.1g",num)
say 'math_format("%03.1g",' num ') = ' math_format("%03.1g",num)
say 'math_format("%03.2d",' num ') = ' math_format("%03.2d",num)
num = 5.1
say 'math_format("%02.0g",' num ') = ' math_format("%02.0g",num)
say 'math_format("%02.1g",' num ') = ' math_format("%02.1g",num)
say 'math_format("%02.0f",' num ') = ' math_format("%02.0f",num)
say 'math_format("%02.1f",' num ') = ' math_format("%02.1f",num)
say 'math_format("%02.2f",' num ') = ' math_format("%02.2f",num)
say 'math_format("%2.2f",' num ') = ' math_format("%2.2f",num)
say 'math_format("%03.2f",' num ') = ' math_format("%03.2f",num)
say 'math_format("%03.2d",' num ') = ' math_format("%03.2d",num)
say 'math_format("%02.2d",' num ') = ' math_format("%02.2d",num)
say 'math_format("%02.0d",' num ') = ' math_format("%02.0d",num)

return
