Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!agate!pasteur!ames!umd5!cvl!elsie!ado From: ado@elsie.UUCP (Arthur David Olson) Newsgroups: comp.lang.c Subject: Re: $1 check for first person who convinces me main can't be reserved Message-ID: <8022@elsie.UUCP> Date: 27 Feb 88 16:56:42 GMT References: <8016@elsie.UUCP> <8020@elsie.UUCP> <7352@brl-smoke.ARPA> Organization: NIH-LEC, Bethesda, MD Lines: 31 Summary: So much for terseness > > IMP: Main. One of our extensions makes it a keyword. > > You're not allowed to use it at all. > This is silly. The proposed standard makes clear what the function of > main() is. . . Oh well, so much for my efforts to keep my example program short. Let's try this slightly longer one: int xyzzy; main() { return 0; } Now last time I looked, xyzzy wasn't mentioned anywhere in the Standard, so the point made above about "main" doesn't apply. So let's head back to Pine Ridge and see what Lum ("IMP") and Abner ("ME") are up to. Listen: ME: By doggies, my program int xyzzy; main() { return 0; } doesn't return zero. IMP: By grannies, you're right. . .you misused a keyword. ME: Huh? IMP: Xyzzy. One of our extensions makes it a keyword. You're not allowed to use it at all. ME: What? You can't make that extension! It alters the behavior of my strictly conforming program! IMP: Your program isn't strictly conforming. You use a (extended) keyword, which Section 3.1.1 says you shall not do. The "shall not" is not in a "Constraint" section. Section 1.6 says "If a 'shall' or 'shall not' requirement that appears outside of a constraint is violated, the behavior is undefined.' And since your program produced "output dependent on. . .undefined. . .behavior," it isn't strictly conforming, per Section 1.7. -- ado@vax2.nlm.nih.gov ADO, VAX, and NIH are Ampex and DEC trademarks