home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!gatech!paladin.american.edu!howland.reston.ans.net!usc!cs.utexas.edu!uwm.edu!src.honeywell.com!tap
- From: tap@src.honeywell.com (Thomas A Peterson)
- Subject: full type declarations within cast expressions or unary expressions
- Message-ID: <1993Jan12.183016.13745@src.honeywell.com>
- Sender: news@src.honeywell.com (News interface)
- Nntp-Posting-Host: aristotle.src.honeywell.com
- Organization: Honeywell Systems & Research Center
- Date: Tue, 12 Jan 1993 18:30:16 GMT
- Lines: 15
-
- Can someone explain to me why does C allow me to place a full type
- declaration within a cast expression or as shown in the following
- example within a sizeof unary expression?
-
- main()
- {
- int a;
-
- a = sizeof(enum colors {red, white, blue});
- {
- enum colors color = blue;
- }
- }
-
- Thanks, Tom
-