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

Palm OS string length constants

Author:   Ben Combee  
Posted: 3/14/03; 3:26:41 PM
Topic: Palm OS string length constants
Msg #: 132 (top msg in thread)
Prev/Next: 131/133
Reads: 2324

PalmSource's Ken Krugler posted a useful bit of info on palm-dev-forum about the constants in the Palm OS header files that tell you minimum lengths for various strings. I've quoted it below with permission from Ken:

Palm OS is unfortunately very inconsistent about naming conventions for limits, but in general if the define is named xxxLen then it's the maximum string length, and you need to add one for the null byte, whereas if it's xxxSize then that includes the null.

Some exceptions to the naming convention I describe above include:

  • dmCategoryLength is 16, not 15
  • maxCurrencyNameLen is the buffer size
  • dmDBNameLength is the buffer size
  • dmMaxVersionStrLength is the buffer size
  • timeStringLength is the buffer size
  • userNameLen includes the null
  • pwdLength is the buffer size
  • countryNameLength is the buffer size
  • SysStringByIndex's maxLen parameter is the buffer size


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