Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:24291 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 15541 invoked by uid 1010); 8 Jul 2006 09:12:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 15526 invoked from network); 8 Jul 2006 09:12:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 8 Jul 2006 09:12:29 -0000 X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.142.136.132 msa2-mx.centurytel.net Linux 2.4/2.6 Received: from ([209.142.136.132:58686] helo=msa2-mx.centurytel.net) by pb1.pair.com (ecelerity 2.1.1.3 r(11751M)) with ESMTP id 59/D0-16663-CF67FA44 for ; Sat, 08 Jul 2006 05:12:29 -0400 Received: from pc1 (d5-57.rt-bras.wnvl.centurytel.net [69.179.132.57]) by msa2-mx.centurytel.net (8.13.6/8.13.6) with SMTP id k689CP0P021182 for ; Sat, 8 Jul 2006 04:12:25 -0500 Message-ID: <002701c6a26e$a1746560$0201a8c0@pc1> To: Date: Sat, 8 Jul 2006 04:12:26 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1807 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1807 Subject: Use of "empty character constant?" From: php_lists@realplain.com ("Matt W") Hi all, I'm a C newbie and just started experimenting with the PHP internals a couple weeks ago... A few days ago I noticed assignment/comparison of char variables to '' (nothing between single quotes) in, for example, the is_numeric_string function (zend_operators.h), snprintf.c, spprintf.c, etc. I don't understand what it's doing. :-/ The only references I can find are about "empty character constant" compiler errors, which is what happens if I try to use '' in the same way (VC++ Express). Though PHP compiles fine with these "constructs," so something must be special there? Sorry to bother the list with this if it's a general C thing that should be known and not PHP-code specific. But I've tried to figure it out on my own (which I have with other stuff so far :-)) and can't, so I'd appreciate it if someone can clue me in! Thanks, Matt