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 CCS Technical Support

compiling error

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



Joined: 27 Nov 2006
Posts: 9

View user's profile Send private message

compiling error
PostPosted: Sat Dec 09, 2006 10:29 pm     Reply with quote

Why am I getting this error? It looks like I have semi-colons everywhere that I need them. I commented the line numbers for reference.

thanks,
Jeff

*** Error 76 " Line 326(11,14): Expect ;
*** Error 76 " Line 335(72,73): Expect ;

Code:
dist=400.0;
            bw=160.0;
            mv=2530.0;
            d=0.264;
            bc=0.164;
            z=300.0;
            sh=-2.03;
            gam=1.40;
            r=8.31432;
            p=0.076474;
            mo=28.9644;
            g=32.1734;
            t=(15.0+273.15);       
            s=(pi/4.0)8.0*d*d/144.0;      //line 326
            m=bw/7000.0;
            c=sqrt(gam*(r/mo)*t);
            k=((p*s*bc*c)/(2.0*m));
            vx=mv-(k*z/3.0);
            tx=((z/3.0/mv)*(log(mv/vx)))/(1.0-(vx/mv));
            angle=(0.0-(sh/12.0)+(0.5*g*tx*tx*(2.0/log(mv/vx))*(1.0-(1.0-(vx/mv))/log(mv/vx))));
            vx0=mv-(k*dist/3.0);
            tx0=((dist/3.0/mv)*(log(mv/vx0)))/(1.0-(vx0/mv));
            drop=(sh/12.0)+dist*angle-(0.5*g*tx0*tx0*(2.0/log(mv/vx0))/log(mv/vx0))));    // line 335
            lcd_putc(0x0c);                           
            lcd_gotoxy(1,1);                        
            printf(lcd_putc,"Drop=%f",drop);
            delay_ms(2000);
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sat Dec 09, 2006 10:48 pm     Reply with quote

You can't take it literally. Just consider it to mean that you have
something wrong with the syntax on that line. Look at the "8.0".
You have no operator between it and the parenthesis.

Quote:
s=(pi/4.0)8.0*d*d/144.0; //line 326



The 2nd problem is not caused by the line with the error, but
instead it's the line right above it. Look for the error.
Ttelmah
Guest







PostPosted: Sun Dec 10, 2006 3:41 am     Reply with quote

I disagree that the second error is on the line above. Count the left brackets and the right brackets on the line istelf...

Best Wishes
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Sun Dec 10, 2006 6:23 am     Reply with quote

You're right. I made a little test program and thought I got an error
on the line above. But upon running the test again, it is the actual line.
Ttelmah
Guest







PostPosted: Sun Dec 10, 2006 8:22 am     Reply with quote

I wish I had a penny for every time it _was_ the 'line above'!... Smile

Best Wishes
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