Xref: utzoo comp.lang.c:26763 comp.lang.misc:4396 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!psuvax1!psuvm!cmh117 From: CMH117@psuvm.psu.edu (Charles Hannum) Newsgroups: comp.lang.c,comp.lang.misc Subject: Re: C strongly typed? Message-ID: <90069.005634CMH117@psuvm.psu.edu> Date: 10 Mar 90 05:56:34 GMT References: <259@eiffel.UUCP) <1990Mar1.172526.28683@utzoo.uucp) <849@enea.se) <1990Mar7.182230.5517@utzoo.uucp) <862@enea.se> Organization: Penn State University Lines: 39 In article <862@enea.se>, sommar@enea.se (Erland Sommarskog) says: > >Well, apparently I am allowed to mix apples and oranges. If I have >two types of data that both happens to be represented by integers, >but have no logical connection what so ever I cannot apparently >express that in C. And consequently I cannot take help from the >compiler to catch inadvertent mixups in for instance procedure calls. Well, yes, the following does compile with no problems: typedef enum { SKIN, CORE } apple; typedef enum { PEEL, SEED } orange; apple grannysmith; orange tangerine; int main(void) { grannysmith = tangerine; } But if I may ask, what's your point? Anyone programmer with half a brain would know that a Granny Smith isn't equivalent to a tangerine. I like C precisely because it DOESN'T hold my hand. Virtually, - Charles Martin Hannum II "Klein bottle for sale ... inquire within." (That's Charles to you!) "To life immortal!" cmh117@psuvm.{bitnet,psu.edu} "No noozzzz izzz netzzzsnoozzzzz..." c9h@psuecl.{bitnet,psu.edu} "Mem'ry, all alone in the moonlight ..."