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
-
fmt | The string format containing a sprintf numeric format specifier. |
num | A 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.