> >Does this single quote convention mean that each character in the 'string'
> >represents a byte in a 4-byte value?
> 
> It means each char is an eight-bit ASCII char. Each gets stored in 
> one byte of the ULong.

  had to put my nose in here :P

  C is a very non-strict type language.. you can assign a char to an
  int very esialy without the compiler complaining..

  ie:

    int c = 'A';

  converts the 'A' into its ASCII equivalent.. being 65 :) c is now
  got the value of 65.

  when you deal with more than one char, it treats it as a larger number,
  where each character represents 8bits in the number.

  ie:

    int c = 'ABCD';

  will assign the number of 0x41424344 (someone please correct me if
  i am wrong) :> the hex values 0x41 = 'A', 0x42 = 'B'. etc.

  the same thing could be done as follows:

    unsigned char *p;
    int c;

    p = &c;
    *p++ = 'A';
    *p++ = 'B';
    *p++ = 'C';
    *p++ = 'D';

  but you can see how tedious that is.. the C compiler is much nicer
  to us :) there are loads of features like this in C - its no surprise
  people done like it.. but personally.. one of the BEST languages i 
  have ever used, if used correctly :P

  hope this explains your questions!

az.
--
Aaron Ardiri 
Java Certified Programmer      http://www.hig.se/~ardiri/
University-College i G�vle     mailto:[EMAIL PROTECTED]
SE 801 76 G�vle SWEDEN       
Tel: +46 26 64 87 38           Fax: +46 26 64 87 88
Mob: +46 70 656 1143           A/H: +46 8 668 78 72

if you enjoy it, then it aint work :) - rule #106 of life


--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to