From: "Mr.Clueless" <chris@dont.spam.me>
Subject: Re: Pool Specific Access Types?
Date: Thu, 06 Sep 2001 15:36:39 GMT
Date: 2001-09-06T15:36:39+00:00 [thread overview]
Message-ID: <bKMl7.84617$K6.34932214@news2> (raw)
In-Reply-To: WiMl7.6560$4z.25901@www.newsranger.com
In article <WiMl7.6560$4z.25901@www.newsranger.com>, Ted
Dennison<dennison@telepath.com> wrote:
> In article <CvLl7.84584$K6.34880767@news2>, Mr.Clueless says...
>> function Sum(List: Cell_Ptr) return Integer is
>> Local: Cell_Ptr := List; S: Integer := 0;
>> begin
>> while Local /= null loop
>> S := S + Local.Value; Local := Local.Next;
>> end loop;
>> return S;
>> end Sum;
>
> It looks cool. Try stepping through this in the debugger, paying
> attention to S and Local.Value. It could be that your ".Value" got huge
> numbers (garbage) in it somehow. If you add two or more of those
> together, then I could see you getting a Constraint_Error.
>
> Another possibility is that you somehow ended up with a circular queue
> when you built it, and it is just iterating around in a circle until you
> blow S past Integer'Last.
I tried loading it up using both GVD and GDB (They're both essentially the
same thing, I know.)
And I get the error right from the start "Cannot access memory at
<address>"
I tried the same list with...
while N /= null loop
Put_Line( N.The_Numb'img); N := N.Next;
end loop;
And got the exact same error message. Even when theres only one number in
the entire list. Even a 0 gives me this message. At least in the book it
works. I even tried using...
while N /= null loop
numb_var := N.The_Numb;
Put_Line( numb_var'img );
N := N.Next;
end loop;
Thinking that maybe I needed to pull the number out of the list and assign
it to a static variable first. Same error.
Somethings fishy here. I'm still working on it.
Thanks.
Clueless chris@dont.spam.me
next prev parent reply other threads:[~2001-09-06 15:36 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-06 14:12 Pool Specific Access Types? Mr.Clueless
2001-09-06 15:07 ` Ted Dennison
2001-09-06 15:36 ` Mr.Clueless [this message]
2001-09-06 15:35 ` James Rogers
2001-09-06 15:54 ` Mr.Clueless
2001-09-06 17:04 ` James Rogers
2001-09-06 20:56 ` Wannabe h4x0r
2001-09-06 21:47 ` Ted Dennison
2001-09-06 22:50 ` Jeffrey Carter
2001-09-06 21:06 ` Pool Specific Access Types? Screw up in the previous post Clueless
2001-09-06 17:06 ` Pool Specific Access Types? Stephen Leake
2001-09-06 22:24 ` Pool Specific Access Types? Thanks Ted...everyone Clueless
2001-09-06 16:55 ` Pool Specific Access Types? Darren New
2001-09-06 17:03 ` Ted Dennison
2001-09-06 17:19 ` Warren W. Gay VE3WWG
2001-09-06 18:55 ` Darren New
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox