GfxTextOut and Decimal restrictions

I would like to restrict the output of this line 2 decimal places only.

GfxTextOut( "CPerc : "+Prec(Lookup(ROC(C,1),dx),2)+" %" ,5+x1Rrect, 66+y1Rrect+FontSize);

Thanks

Use StrFormat( "%.2f", number ); and please do read the manual:

https://www.amibroker.com/f?strformat

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.