 |
Wednesday, January 16, 2002 |
 |
|
MSL for Palm OS design philosophy
I had a poster to codewarrior.palm ask about some standard library functions, so I thought I'd post an edited version of my reply. You may find it useful to get a feel for where we are going on this:
does metrowerks in the near future support something like "math.h" or other ansi functions (like sprintf with %f)?
We are going to continue adding to our C and C++ library for Palm OS in future releases. For math.h support, we really like using MathLib, and we ship that as part of our toolset. You can statically link against parts of that, using directions included in the distribution.
For floating point input and output, you should find the 8.2 patch coming soon helpful. In that version, C++'s <sstream> will work for converting, i.e.
std::stringstream s;
s << f; // output float f
s >> f; // input float f
I looked into supporting sprintf, but the current implementation in MSL is tied too closely to standard file I/O support, so using it would really cause too much code bloat.
I guess the key design criteria for "MSL for Palm OS" are:
- Is this useful to Palm OS programmers?
- Can this be added reusing functionality already in Palm OS?
- If not, is the code size small enough to not be a burden for an
application?
Right now, sprintf get a yes for #1, but a no for #2 and #3.
|
|
| January 2002 |
| Sun |
Mon |
Tue |
Wed |
Thu |
Fri |
Sat |
| |
1 |
2 |
3 |
4 |
5 |
| 6 |
7 |
8 |
9 |
10 |
11 |
12 |
| 13 |
14 |
15 |
16 |
17 |
18 |
19 |
| 20 |
21 |
22 |
23 |
24 |
25 |
26 |
| 27 |
28 |
29 |
30 |
31 |
|
|