Path: utzoo!mnetor!tmsoft!torsqnt!lethe!yunexus!ists!helios.physics.utoronto.ca!news-server.csri.toronto.edu!cs.utexas.edu!uunet!munnari.oz.au!bruce!monu1!monu6!vac253v From: vac253v@monu6.cc.monash.edu.au (Richard Jones) Newsgroups: comp.sys.amiga.programmer Subject: Arrays in C Message-ID: <1991Feb7.013441.14395@monu6.cc.monash.edu.au> Date: 7 Feb 91 01:34:41 GMT Organization: Monash University, Digital Technology. Lines: 27 Hi there all you C masochists. I am slowly changing my programming to 68k, but here's one final little doosy to get you all thinking. I am using Aztec 3.6a and the arrays I am setting up are doing really wierd things. Basically, I have this array callled map[200][200], guess what it holds.... (altitudes, if you hadn't guessed). Now, main() is at the end of the program (a hangup from old Pascal programming days). The first thing that this incredibly complex main() does is the following..... map[0][0] = -20; map[0][100] = -20; map[100][0] = 0; map[100][100] = 0; Now, I compile the thing with the -n and -g options to debug it with SDB. BTW, it doesn't work without these options. Using SDB, I find that the third assignment above ends up placing -20 into 100,0 and 100,100 is random. The unassebled code for these two lines (unavailable) looks real wierd. something like a move.l -169,(a0)- move.l -201,(a1)+ Any help would be appreciated, thanx. Richard Jones | *DISCLAIMER* - All opinions contained vac253v@monu6.cc.monash.edu.au | within are mine, MINE, ALL MIIIIINE!!!!!!