🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

re:bug in Manx C

#9859
From: Scot Kleinman
Date: Mon, 19 Sep 1988 15:34
21 lines
1544 bytes
	Dear Net,     
A while ago I posted a problem I had in Manx with a variable being changed after
running a loop which modified other variables.  Well, it turns out, I was indeed
overwriting an array.  Chalk it up to being a novice programmer, not used to the
intricasies of C.  I am now a little confused, however.  The first element in an
array is numbered 0 (i was using a char array in my procedure), so when you
declare the array, does one declare the number of entries (ex.3 entries numbered
0, 1, and 2) or the highest index number (ex. 3, giving 4 entries 0,1,2,3)? I 
assume, from my mistake, that the former is the proper technique, but trying to
test the theory confused me even more.
I guess I sould really be posting this to the C net, but I wanted to explain
what had happened, and apologize for suggesting it may be a bug (oh, what 
ignorance!)
The program I am working on is designed to be run on startup and will tell
the uer whose birthdays are coming up within the next two weeks.  I can post
it when (and if) I ever figure it all out.  Thanks for being patient with me
and for helping me out.

Scot   sjk@astro.as.utexas.edu
Thanks a million! -Phil Alvin
Technical Details
Message-ID: <3140@utastro.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!ukma!rutgers!cs.utexas.edu!utastro!sjk

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!lll-winken!lll-tis!ames!mailrus!ukma!rutgers!cs.utexas.edu!utastro!sjk
From: sjk@utastro.UUCP (Scot Kleinman)
Newsgroups: comp.sys.amiga.tech
Subject: re:bug in Manx C
Keywords: Oops, my mistake
Message-ID: <3140@utastro.UUCP>
Date: 19 Sep 88 15:34:42 GMT
Organization: U. Texas, Astronomy, Austin, TX
Lines: 20