CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Why can't the compiler handle this? [solved]

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
russk2txb



Joined: 30 Mar 2008
Posts: 109
Location: New Jersey

View user's profile Send private message

Why can't the compiler handle this? [solved]
PostPosted: Mon Apr 04, 2011 10:14 am     Reply with quote

I'm so frustrated. I have been fighting problems like this forever and today I got the latest compiler 4.119 and still this does not work:

Code:
typedef struct {
    int      Sf [2];      // scale factors for gain and mag
    int      iOffset [4];
    long     vOffset [4];
} HpaData;

HpaData  HPa [3];

void SetNewOffset (int channel, int hpa, int iOffset)
{
    HPa [hpa].iOffset [channel] = iOffset;  // <--- error line
}


Still get the same error:

Quote:

***Error 66: Previous identifier must be a pointer


This error is repeated twice for the same line, with the same line position shown both times.

As you can see, there are no pointers involved in this. HPa is an array of structures that contain arrays.

The worst of the problem is that if I fool around with using the & and * operators long enough so that the compiler will accept it, then it usually gets the math wrong and returns garbage results.

CCS - does not anyone else in the world try to work at this level???

Thanks, Russ
russk2txb



Joined: 30 Mar 2008
Posts: 109
Location: New Jersey

View user's profile Send private message

PostPosted: Mon Apr 04, 2011 10:42 am     Reply with quote

Sorry everyone, dang compiler bit me again. Did not have a #CASE statement. I can't count the # of time that has bit me and I cannot believe I never figured out how to make it observe case before. AFAIK it is standard for all C compilers to observe case...

Sorry - Russ
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group