Subject:
|
Re: IC Problem
|
Newsgroups:
|
lugnet.robotics.handyboard
|
Date:
|
Fri, 23 Jul 1999 18:09:15 GMT
|
Original-From:
|
Will Bain <willbain@cs./stopspam/umt.edu>
|
Viewed:
|
934 times
|
| |
| |
Stephen Marsland wrote:
> I had code which ran fine under gcc, but ic hates it.
> I've got an array of pointers to a strct,
>
> struct SOFM *ptrSOM[4]
>
> and then within the program
> for (j=0; j<4; j++)
> function_call(ptrSOM[j])
>
> but the compiler sees this as a pointer to an array, rather an element
> of an array of pointers.
I had to go RTFM for this one ;-)
It says:
5.6 Arrays and Pointers
IC supports one-dimensional arrays of characters,
integers, long integers, and floating-point numbers.
Pointers to data items and arrays are supported.
It doesn't say that pointers to pointers or arrays of pointers or 2-D arrays are allowed, so I'm guessing that they're not. Also, I see no mention of structs being supported, either.
IC is a little different from regular C, but it's still a powerful, expressive language. I'm sure there's probably a way to do what you want in IC, but with such a small code snippet, I can only guess. But hey, at least we're not stuck with only machine language programming <8-o
Good luck!
-- Will
, ,
__@_/ \_@__ |/
| /__, o @_/
)\ ) ( \ (\/\\,
~~~~~~~~~ ' ` ~~~~~~~~~~~ ` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Wendy Parson, Idealism is fine, but as it approaches reality
Will Bain, the cost becomes prohibitive.
& Tatoosh --William F. Buckley, Jr.
|
|
Message is in Reply To:
| | IC Problem
|
| -- Hello. I hope you can help. I'm using IC 3.1 for Linux and am having a problem with structs. I had code which ran fine under gcc, but ic hates it. I've got an array of pointers to a strct, struct SOFM *ptrSOM[4] and then within the program for (...) (25 years ago, 23-Jul-99, to lugnet.robotics.handyboard)
|
2 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|