🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #4034

Re: MANX 5.0 Bugs

#4034
From: Dave Mc Mahan
Date: Wed, 13 Jun 1990 04:45
52 lines
1471 bytes
 In a previous article, cg377170@eng.clemson.edu (Corey Gehman) writes:
>Just so everyone can prove it to {him/her}self.  The following short program:
>
>int array[20];
>
>main()
>{
>   int i;
>
>   for (i=0;i<20;i++) array[i]=1;
>   for (i=1;i<20;i++) array[i] += array[i-1];
>   for (i=0;i<20;i++) printf("array[%d]=%d\n",i,array[i]);
>}
>
>compiled with no cc flags and linking clib only.
>
>prints out the following:
>
>array[0]=2
>array[1]=2
>array[2]=2
>...
>array[18]=2
>array[19]=1

>Now, unless, I'm a completely idiot (which is possible) that's wrong.

Well, I ran your example through the unix compiler, and I get:

array[0]=1
array[1]=2
array[2]=3
...
array[18]=19
array[19]=20


>Right?

As a guess, I'd say your right.       :-)


>So, the bottom line.  Manx cann't add.  Simple.

Correct again.  Did you try the example by moving the declaration for
array[] inside the main() function?  Maybe you'll get different (and better)
answers.

>Corey Gehman

   -dave
Technical Details
Message-ID: <13271@netcom.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!dino!ux1.cso.uiuc.edu!brutus.cs.uiuc.edu!apple!netcom!mcmahan
References: <9281@hubcap.clemson.edu> <1990Jun13.022216.202@laguna.ccsf.caltech.edu> <9332@hubcap.clemson.edu>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!dino!ux1.cso.uiuc.edu!brutus.cs.uiuc.edu!apple!netcom!mcmahan
From: mcmahan@netcom.UUCP (Dave Mc Mahan)
Newsgroups: comp.sys.amiga.tech
Subject: Re: MANX 5.0 Bugs
Keywords: BUGS
Message-ID: <13271@netcom.UUCP>
Date: 13 Jun 90 04:45:10 GMT
References: <9281@hubcap.clemson.edu> <1990Jun13.022216.202@laguna.ccsf.caltech.edu> <9332@hubcap.clemson.edu>
Organization: Dave McMahan @ NetCom Services
Lines: 52