Subject:
|
Re: problems with creating arrays of larger sizes
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Mon, 17 May 2004 07:13:33 GMT
|
Viewed:
|
5046 times
|
| |
![Post a public reply to this message](/news/icon-reply.gif) | |
OK, here is my code.
#include <dmotor.h>
#include <dsensor.h>
#include <unistd.h>
#include <dbutton.h>
#include <conio.h>
#include <stdio.h>
#define n 1000
void verzoegerung(unsigned long zeit)
{
while(zeit--);
}
int main()
{
int i;
char c[n];
cputs("Anfang");
verzoegerung(20000);
for(i=0;i<n;i++)
{
*(c+i)=0;
}
cputs("ENDE");
return 0;
}
I also found out that after changing the array type e.g. in long or integer and
changing the large so that the array reserves space over 0.97 kB will crash the
RCX.
In lugnet.robotics.rcx.legos, Michael Obenland wrote:
> Andreas Jurk wrote:
>
> > If I try to initialize this array with values my RCX crashes and I have do reset
> > it by taking out the batteries.
> >
> > Is the reason of the crash connected with memory limits?
>
> Who knows. Unless you show your code...
>
> Regards,
>
> Michael
|
|
Message has 2 Replies:
Message is in Reply To:
6 Messages in This Thread: ![problems with creating arrays of larger sizes -Andreas Jurk (14-May-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![Re: problems with creating arrays of larger sizes -Michael Obenland (14-May-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![You are here](/news/here.gif) ![](/news/246.gif) ![Re: problems with creating arrays of larger sizes -Nathan Braun (17-May-04 to lugnet.robotics.rcx.legos)](/news/x.gif)
![](/news/x.gif) ![](/news/x.gif) ![](/news/68.gif) ![Re: problems with creating arrays of larger sizes -Michael Obenland (17-May-04 to lugnet.robotics.rcx.legos)](/news/x.gif) ![](/news/46.gif) ![RE: problems with creating arrays of larger sizes -Elizabeth Mabrey (18-May-04 to lugnet.robotics.rcx.legos)](/news/x.gif)
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|