From: Josef 'Jupp' Schugt Date: 2008-05-26T23:09:01+09:00 Subject: Re: Why "ABCDE"[0] returns an integer instead of 'A' ? --Sig_/eQEw9Ljpsl2DL.HKQWqBlw/ Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable * I=C3=B1aki Baz Castillo, 2008-05-26, 19:27: > Hi, I cannot understand how a high level language as Ruby doesn't > handle a simple thing as C does with strings: >=20 > in C: > string =3D "ABCDE" > string[0] > =3D> 'A' $ echo "#include \nint main() { return 'A';}" > a.c; \ cc a.c; ./a.out; echo $? 65 Josef 'Jupp' Schugt --=20 Blog available at http://cip.physik.uni-bonn.de/~jupp/ PGP key with id 6CC6574F available at http://wwwkeys.de.pgp.net/ Jabber - http://www.jabber.org/ - contact information on request --Sig_/eQEw9Ljpsl2DL.HKQWqBlw/ Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (GNU/Linux) iD8DBQFIOsSYrhv7B2zGV08RAqchAKC16QhAshOPXVl3AIxPk9KQJYzPxQCePGUh JTb8CvwFvV/5ey0NdpyqU7k= =HpmE -----END PGP SIGNATURE----- --Sig_/eQEw9Ljpsl2DL.HKQWqBlw/--