Is there someplace where I can find some documentation on how CW sets up the
various types of code sections that are used in a Palm app? And also an
explanation of how static/global data is handled in a Palm app? Mainly I'm
wondering about the differences in the way that the following declarations
are handled:
a) static var, e.g.: static int somevar;
b) static initialized var, e.g.: static int is_set = 0;
c) constant static initialized, e.g.: static const char string1[] =
"Hello, world.";
My app uses a number of constant static vars, mostly character strings, and
I was assuming that these could be generated in the same sections as the
executable code since they are basically read-only data. Thus, they wouldn't
need to be copied from one place to another when the app starts as is the
case for non-constant static vars. Is this a correct assumption, or is the
keyword "const" really just of significance for compile time checking?
Also, what would be the difference in code generation between the following
examples:
a) static const char mstring[] = "Hello, world!"
StrCopy(dest, mstring);
b) StrCopy(dest, "Hello, world!");
I guess I'm looking to find out how constant data is handled in CW and on
the Palm as opposed to static/global variable data.
Doug Gordon
---
You are currently subscribed to palm-dev-forum as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]
For more information on the Palm Developer Forum's, see
<http://www.palm.com/devzone/mailinglists.html>