Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/5/84; site grpwre.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!tektronix!reed!psu-cs!grpwre!carlm From: carlm@grpwre.UUCP (Carl McConnell) Newsgroups: net.micro.att Subject: Re: What's wrong with this program (3b2)? Message-ID: <162@grpwre.UUCP> Date: Tue, 18-Jun-85 13:18:39 EDT Article-I.D.: grpwre.162 Posted: Tue Jun 18 13:18:39 1985 Date-Received: Thu, 20-Jun-85 11:32:55 EDT References: <104@gwsd.UUCP> Organization: Groupware Systems, Lake Oswego OR Lines: 33 I think the problem was that the floating-point interpreter wasn't loaded; i.e., the program should have been compiled with "cc -g -f temperature.c". Carl McConnell Groupware Systems {ucbvax,decvax}!tektronix!reed!grpwre!carlm (Relevant portion of the original article follows...) > The following program came out of the K&R book, page 8. > When compiled on a 3b2 (SYS-V.2)... > > $ cc -g temperature.c > $ a.out > Illegal instruction - core dumped > $ sdb a.out > main:15: fahr = lower; > *q > > -----program follows----- > > #include > > /* print Fahrenheit-Celsius table > for f = 0,20,...,300 */ > main() > { > int lower, upper, step; > float fahr, celsius; > > lower = 0; /*lower limit of temperature table */ > ...(etc)