jewoh  wrote:
Okay.But is there not a function, thats convert { "test" } to { 0x74, 0x65, 0x73, 0x74, 0x00 }? because the reader can only understand command in the last form ({ 0x74, 0x65, 0x73, 0x74, 0x00 }).
I hope you have understand what i mean.
{"test"} and { 0x74, 0x65, 0x73, 0x74, 0x00 }
are the same. identical. if you put "test" into an array
{ 0x74, 0x65, 0x73, 0x74, 0x00 } will be in it.
"test" is an array of characters, 0x74, 0x65, 0x73, 0x74, 0x00 are all values in that array that are usually represented as letters. each letter is a byte, each hex value 0xXX is a byte. 0x74 = 't' 0x65 = 'e' so when you use "test", it may look like "test" to you, but the computer sees it as { 0x74, 0x65, 0x73, 0x74, 0x00 } so there is no further conversion necessary.




--- In [EMAIL PROTECTED], Matt Graham <[EMAIL PROTECTED]> wrote:

Silvain Jewoh wrote:

I write some Application to read a chip Card with a chip card

reader for

palm. I must send the commans to the reader in Hex (e.g. Char com

[] =

{0x00, 0x33, 0x34, 0x34,0x00}).

The user must give some parameter on the palm and i dont know how

i can

change the format Char com [] = {"test"} to this Char com [] =

{0x00,

0x00......
I'm not entirely clear on what you're actually asking but I'll give
it a
shot.

0x00 format is just a byte. one hex digits represents 4 bits, so 2
hex
digits represents 8 bits or a byte.
char com[] = { "test" } = char com[] = { 0x74, 0x65, 0x73, 0x74,
0x00 }

so, you might already have it in the right format.
hope that helps
Matt


--
For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to