Overview
- Object ID : 2109 (2013-05-02)
- Author : Peter Verkaik | added by Archiver
- Content : Code
- Microcontroller : Propeller 1
- Language : SPIN
- Category : Tool
- Licence : Other
Content
This library object provides formatted string output and scan methods based on the standard C sprintf and sscanf functions. With this object you can convert byte, word and long types into binary, octal, decimal or hexadecimal formatted strings. You can specify the minimum and maximum number of columns to display your values, and these values can be left or right justified, with or without padded zeros.
Methods are included for the following C library functions: itoa, atoi, sprintf and sscanf. This implementation defines the functions bprintf and bscanf that take one, and only one, variable parameter. The original format string must be split into pieces that all have one format specifier. This normally is not a problem since most format strings consists of fixed text with format specifiers for values.