|
The free IC does support one-dimensional arrays.
Fred
On Saturday, May 12, 2001, at 12:58 AM, Chris wrote:
> From: Chris <burkharc@bvsd.k12.co.us>
> Date: Sat May 12, 2001 12:58:03 AM US/Eastern
> To: lugnet.robotics.handyboard@lugnet.com
> Subject: Re: HELP!!Arrays in IC
> Reply-To: burkharc@bvsd.k12.co.us
> X-Envelope-To: fredm@alum.mit.edu
> Errors-To: news-errors@lugnet.com
> Posted-Date: Sat, 12 May 2001 04:58:03 GMT
>
> What version of IC are you using? I know the free version doesn't
> support
> arrays (at least I don't think so).
>
> Sachin Kothawade wrote:
>
> > HI
> > I have been trying to use arrays in Interactive C with the handybaord.
> > I have to read from analog inputs 0,1,2 and 3 of the handybaord and put
> > those values in an array.
> > so I had written:
> >
> > int v0=analog(0);
> > int v1=analog(1);
> > int v2=analog(2);
> > int v3=analog(3);
> > int x[4];
> > int x[]= {v0,v1,v2,v3};
> >
> > but when I try to download the file into HB, it gives me a syntax error
> > around the line in which I am assigning values to my array elements
> > i.e. the
> > last line in the code above..if I change the last line to
> > int x{}= {1,2,3,4}; then it works fine...now that is kinda
> > weird..that I
> > cannot assign variables as array elements??
> >
> > Any help would be greatly appreciated..
> > Thanks
> > Sach
>
|
|
Message has 1 Reply: | | Re: HELP!!Arrays in IC
|
| (...) really? what was I thinking of then, does the commercial version of IC support 2d arrays? Thanks for telling me, I might have spent the rest of my robot programming days without arrays :-( <>< Chris ><> (24 years ago, 12-May-01, to lugnet.robotics.handyboard)
|
Message is in Reply To:
4 Messages in This Thread:
- 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
|
|
|
|