From: jared jennings Date: 2002-12-27T18:37:39+09:00 Subject: Re: putc ?. --=.Oyvl6v5xz8,p_0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 27 Dec 2002 17:10:05 +0900 zhoujing@comp.nus.edu.sg (TOTO) wrote: > Can someone explain: > > putc ?. > > and > > putc "\."? > > It seems to me that they have the same effect. But I don't quite > understand the first one. > > Thanks in advance. > ?. is a character constant, like '.' in C. "\." is a one-character string containing a '.' - so given foo = ?. bar = "\." baz = "." bar == baz (escaping normal characters with \'s inside "" does nothing to them) bar[0] == baz[0] == foo == ?. == 46 All the character constants start with ?, so e.g. ?A == 65. (you can't use '' for character constants since it's already used for strings) -- Doubt is a pain too lonely to know that faith is his twin brother. - Gibran Khalil Gibran --=.Oyvl6v5xz8,p_0 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (GNU/Linux) iD8DBQE+DB9fOisiGTHNU4ERAnExAJ44ou3ACcxUnl30/My1anVPI9Vg5QCgpkYC 1kY2hKvjFiw5IxT+Frl2cZg= =8hoa -----END PGP SIGNATURE----- --=.Oyvl6v5xz8,p_0--