Also note that %i means integer in c++ but i dont know if gs supports it you could try "%d",(long)value or "%d",(int)value or "%d",integer(value) and i dont know if this is relevant but you could printf the value into the text and use the text in the digit field perhaps if printf supports more formatting