NXC  Version 1.2.1 r5
 All Data Structures Files Functions Variables Groups Pages
string FormatNum ( string  fmt,
variant  num 
)
inline

Format a number.

Return the formatted string using the format and value. Use a standard numeric sprintf format specifier within the format string. The input string parameter may be a variable, constant, or expression.

Parameters
fmtThe string format containing a sprintf numeric format specifier.
numA number.
Returns
A string containing the formatted numeric value.
Warning
This function requires the enhanced NBC/NXC firmware.
Examples:
ex_acos.nxc, ex_acosd.nxc, ex_addressof.nxc, ex_addressofex.nxc, ex_asin.nxc, ex_asind.nxc, ex_atan.nxc, ex_atan2.nxc, ex_atan2d.nxc, ex_atand.nxc, ex_delete_data_file.nxc, ex_displayfont.nxc, ex_file_system.nxc, ex_FormatNum.nxc, ex_GetBrickDataAddress.nxc, ex_ReadSensorHTBarometric.nxc, ex_reladdressof.nxc, ex_setdisplayfont.nxc, ex_string.nxc, ex_tan.nxc, ex_tand.nxc, util_battery_1.nxc, util_battery_2.nxc, and util_rpm.nxc.