English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

int i;
long lx,ly, lz;
float fz,x,y;
void cordic();

x=1.0;
for (i=0; i {
lx = x*MBIT;
ly = y*MBIT;
lz = 0;
cordic(lx,ly,lz);
fz = (float)lz/MBIT;


/* CORDIC m=1, y-->0 */

void cordic(x,y,z)
long *x, *y, *z;
{
int i;
long xx, yy, zz;

for(i=0; i {

if( *y>=0)
{
xx = *x + (*y>>i);
yy = *y - (*x>>i);
zz = *z + constbl[i];

}
else
{
xx = *x - (*y>>i);
yy = *y + (*x>>i);
zz = *z - constbl[i];
}
*x = xx;
*y = yy;
*z = zz;

}

}

i keep getting error message that`s said "There`s an extra parameters when calling CORDIC function

2007-02-04 17:00:15 · 2 answers · asked by astri 2 in Computers & Internet Programming & Design

2 answers

This isn't the entire program, and due to that fact I cannot compile it and run it for you since there numerious amounts of syntax errors such as the one where CBIT and MBIt are not declared...anyway, personally what I belive the problem is...

here is your function prototype

void cordic();

Here is your function call
cordic(lx,ly,lz);

here is your function definition
void cordic(x,y,z)

If you don't know what is going on, you seriously need to read a chapter on functions, not to be mean but this is somewhat of a simple thing to fix. You need to have the SAME number and SAME order and SAME parameters in the function call, function call, and function definition. here is an example of the 3 above

//function prototype
void cordic(x,y,z);
//function call
cordic(x,y,z);
//function definition
void cordic(x,y,z)
{
//code here
}

Since I am unable to compile the program as you wrote it, I cannot tell you if there are any more logic or syntax errors.


P.S. its called a compiler, not a builder.

2007-02-04 17:14:32 · answer #1 · answered by D 4 · 0 1

i'm not one hundred% specific using fact that i haven't used Borland in a very long term yet my first wager is that your incorporate path is inaccurate so its not looking in the the superb option region for those data.

2016-12-13 09:05:08 · answer #2 · answered by anirudh 4 · 0 0

fedest.com, questions and answers