bartop

palmoswerks ARCHIVE
Palm OS programming tips from a (former) CodeWarrior insider

header

Navigation

Search
Home
About
Stories
Stuff I Like
Articles
PilRC
CodeWarrior
palmos.techwood.org
DevTools List
Palm OS Dev FAQ

 Permanent link to archive for 1/16/02.   Wednesday, January 16, 2002 daytail

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:

  1. Is this useful to Palm OS programmers?
  2. Can this be added reusing functionality already in Palm OS?
  3. 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.

brought to you by weblogger.com

 
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  
Nov   Feb


Send feedback to combee@techwood.org
Copyright © 2004 Benjamin L. Combee
Palm OS is a registered trademark of PalmSource, Inc.
Metrowerks and CodeWarrior are registered trademarks of Metrowerks Inc.

The views expressed on this website/weblog are those of mine alone and do not necessarily reflect the views of PalmSource or Metrowerks.

This is a Manila Site

qwertYAK / frobnovich