From: | Jerome MARREC |
Date: | 08 Sep 2000 at 10:27:51 |
Subject: | RE: Type Conversion |
A char is an ASCCI value. All you have to do is to cast to
int to ensure type-checking is done correctly
eg if you do:
printf("value = %d", 'a');
you will get the ASCCI value of character 'a'
to print it in binary format use the write() function
-----Message d'origine-----
De : Adam Bell [mailto:adambell@connectfree.co.uk]
Envoye : vendredi 8 septembre 2000 10:50
A : amiga-c@egroups.com
Objet : [amiga-c] Type Conversion
My Groups | amiga-c Main Page | Start a new group!
Hi,
I have a feeling this is basic stuff for the people here, but I'll
ask anyway.
How can I convert a char into its ASCII value and then into binary
and back again?
Cheers,
Ad.