Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ucbvax!CORY.BERKELEY.EDU!dillon From: dillon@CORY.BERKELEY.EDU.UUCP Newsgroups: comp.sys.amiga Subject: Re: Is this a Manx Bug? Message-ID: <8701301738.AA02035@cory.Berkeley.EDU> Date: Fri, 30-Jan-87 12:38:14 EST Article-I.D.: cory.8701301738.AA02035 Posted: Fri Jan 30 12:38:14 1987 Date-Received: Sat, 31-Jan-87 06:47:01 EST Sender: daemon@ucbvax.BERKELEY.EDU Organization: University of California at Berkeley Lines: 16 >I recently ported a UNIX program to the Amiga. All went well execpt for >one GURU that was caused by an index that was not initialized to zero >at every entry to a subroutine. I put in an 'i=0;' and fixed it. >later I was reading my C manual and it said that all 'auto' variables >should be automaticly initialized to zero at every entry to the subroutine. >The UNIX C does this, but Manx does not. Is this a Manx bug? > >Joel Swank >Tektronix, Redmond, Oregon Only static and global variables are 0 initially. Auto (stack) variables are not initialized at all and thus contain random values. You either misinterpreted the C manual or the C manual is wrong. -Matt