Xref: utzoo comp.lang.fortran:758 comp.lang.c:10718 Path: utzoo!attcan!uunet!nfsun!ditka!csanta!greg From: greg@csanta.UUCP (Greg Comeau) Newsgroups: comp.lang.fortran,comp.lang.c Subject: Re: Should I convert FORTRAN code to C? Message-ID: <134@csanta.UUCP> Date: 13 Jun 88 13:15:12 GMT References: <10655@agate.BERKELEY.EDU> <1857@hubcap.UUCP> <10681@agate.BERKELEY.EDU> Reply-To: greg@csanta.UUCP (Root) Organization: Comeau Computing, Richmond Hill, NY Lines: 13 >> Gee, I just tried compiling x = +5; it worked. > i = +5; >comments: > "junk.c", line 5: syntax error >It may very well work in other compilers, and will probably be added in >the new standard, but is not there now. If an old compiler accepts this it is probably just being lazy for some reason. Since C does not have a unary plus, it should be a syntax error. Note that the ANSI draft does allow a unary plus now though since "hey, there's a unary minus so let's at least be consistent". Also, at one time ANSI did apply a binding characteristic to the unary plus applied to parenthised expression (say: a + +(b + c) if I recall), but that has since been withdrawn.