A new one on me...

brian_helterline brianh at hpcvia.CV.HP.COM
Fri Dec 1 03:07:19 AEST 1989


bzs at world.std.com (Barry Shein) writes:

>In a pd program I ran into a line like this:
>
>	if(c == '')
>	...

>Sun 4.0.3 cc gives me a non-fatal error (empty character constant.)

>Is there any meaning assigned to this? I assume it meant something in
>Turbo/C (under which the program was developed.)

>It surprised me enough that I thought the language lawyers would be at
>least amused. Darn, we could have used that for our favorite feature!
>-- 
>        -Barry Shein

>Software Tool & Die, Purveyors to the Trade         | bzs at world.std.com
>1330 Beacon St, Brookline, MA 02146, (617) 739-0202 | {xylogics,uunet}world!bzs
>----------

	I believe the code was comparing c to the null character '\0' 
	although I have never seen an C that looked like that.


-------------------------------------------------------------------------------
Brian Helterline                                        brianh at hpcvia.cv.HP.COM
Hewlett Packard                                         ..!hp-pcd!hpcvia!brianh
Corvallis, OR  97330                            "Life's a beach, then you fry!"



More information about the Comp.lang.c mailing list