Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!purdue!haven!mimsy!chris From: chris@mimsy.umd.edu (Chris Torek) Newsgroups: comp.lang.c Subject: Re: casts and assignments Message-ID: <21106@mimsy.umd.edu> Date: 5 Dec 89 14:08:07 GMT References: <6589@arcturus> <21033@mimsy.umd.edu> <3979@vax1.tcd.ie> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 33 [someone's question about a = (type of 'a') (expression); and my reply deleted] In article <3979@vax1.tcd.ie> mbrennan@vax1.tcd.ie writes: >int i ; >int j ; >long l ; > > l = i * j ; > l = (long) i * j ; >I realise I may be answering a slightly different question than you posed, >but ... You are: the latter is not l = (long) (i * j); but rather l = (long) i * j; which binds as l = ((long) i) * j; Hoping to stem the oncoming tide of confusion (not to mention the oncoming rerun of how `long=short*short' is the [incorrect] way to get fast multiplies out of a handful of 680x0 compilers that do things the hard way for `long=(long)short*short'), -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@cs.umd.edu Path: uunet!mimsy!chris