Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!godot!ima!ISM780!darryl From: darryl@ISM780.UUCP Newsgroups: net.lang.c Subject: Re: conversion of short to unsigned it Message-ID: <176@ISM780.UUCP> Date: Wed, 20-Mar-85 00:43:56 EST Article-I.D.: ISM780.176 Posted: Wed Mar 20 00:43:56 1985 Date-Received: Thu, 21-Mar-85 03:11:27 EST Lines: 26 Nf-ID: #R:ncrcae:-212500:ISM780:30000004:000:842 Nf-From: ISM780!darryl Mar 19 07:04:00 1985 [Stop me before I quote again!] K&R, page 184, section 6.6, "Arithmetic Conversions": "A great many operators cause conversions and yield result types in a similar way. This pattern will be called the "usual arithmetic conversions". "First, any operands of type char or short are converted to int, and any of type float are converted to double. : : : "Otherwise, if either operand is unsigned, the other is converted to unsigned and that is the type of the result. : : : The new version of the C reference manual supplied with system V changes the results in the case of long x unsigned; in K&R, this results in a long, but now it is an unsigned long (is there any real difference?). --Darryl Richman, INTERACTIVE Systems Corp. ...!cca!ima!ism780!darryl The views expressed above are my opinions only.