Kenichi Okuyama wrote in message <6968@palm-dev-forum>...
>
>>>>>> "HK" == Holger Klawitter <[EMAIL PROTECTED]> writes:
>>> QRY-2 : If this creatorID is a string, how & where it is converted to
UInt as desired by DmOpenDatabaseByTypeCreator() system call ?
>HK> It's not a string, it a 32 bit integer. Note the difference in the
quotes:
>HK> UInt32 id = 'ABCD';
>HK> Char *text = "ABCD";
>
>I don't think this is good answer, for how 'ABCD' is being treated,
>is implementation dependent.
Correct. But for the implementations we are dealing with,
it is handled properly. If somebody else comes up with a
new compiler for the Palm, they will either have to handle
this the same way or come up with some sort of
UInt CreatorID("abcd")
type of function.
For what it's worth, this is merely a variant of an old trick
we used for checking command line flags using '-x' (or
'x-' on little-endian machines) in case statements.
The main thing is that, standard C or not, it works for
the compiler implementations that you will be dealing
with.
--
-Richard M. Hartman
[EMAIL PROTECTED]
186,000 mi/sec: not just a good idea, it's the LAW!
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palm.com/devzone/mailinglists.html