Subject:
|
Re: error from makelx: address out of bounds
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Fri, 20 Apr 2001 10:21:38 GMT
|
Viewed:
|
1608 times
|
| |
| |
I've found it. They must be declared as static:
static LightSensor s(LightSensor::S3,false);
int main(){
...
}
Regards.
Michael Wisse
Michael Wisse wrote:
>
> Hallo!
>
> My question again:
>
> I tried to declare sensors global, out of main():
>
> Motor motor(Motor::B);
> LightSensor s(LightSensor::S3,false);
>
> int main(){
>
> ...
> }
>
> make reports an error:
>
> /home/micha/legOS/util/makelx test.ds1 test.ds2 test.lx
> test.ds1: address out of bounds on line 311
>
> If I declare the sensors within main(), it works.
>
> It is remarkable, that the error seems not to come from the compiler.
>
> Best regards.
> Michael
|
|
Message is in Reply To:
| | error from makelx: address out of bounds
|
| Hallo! My question again: I tried to declare sensors global, out of main(): Motor motor(Motor::B); LightSensor s(LightSensor::S3,false); int main(){ ... } make reports an error: /home/micha/legOS/util/makelx test.ds1 test.ds2 test.lx test.ds1: (...) (24 years ago, 17-Apr-01, to lugnet.robotics.rcx.legos)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|