Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!mcsun!sunic!enea!sommar From: sommar@enea.se (Erland Sommarskog) Newsgroups: comp.lang.c Subject: Re: C strongly typed? Message-ID: <863@enea.se> Date: 10 Mar 90 00:12:04 GMT References: <849@enea.se) <2963@goanna.oz.au) Organization: Enea Data AB, Sweden Lines: 24 Richard O'keefe (ok@goanna.oz.au) writes: )A Pascal compiler may complain that "o" is uninitialised, but it )*must* accept the assignment as well-typed. (I tried it.) True, Pascal is as weakly typed as C. )Try it in Ada (not checked, as I haven't access to an Ada compiler): ) declare ) subtype apple is integer; ) subtype orange is integer; ) a: apple; ) o: orange := 1; ) begin ) a := o; ) end )Again, the assignment is well-typed. Why should C be different? That compiles, I would guess, but not if you declare: TYPE apple IS NEW integer; TYPE orange IS NEW integer; which of course the way to do it. -- Erland Sommarskog - ENEA Data, Stockholm - sommar@enea.se