Hi,
Apart from the typo that Leo pointed out, it looks like the problem you are having is that you have more than one function in your workspace with the same name and prototype. You did not paste the entire error message and so not clear if that error pointed to your function named test(), or some other function. You should check the contents of your current workspace.
Note that Origin C allows function overloading, so that you can have multiple functions of the same name, provided they are of different prototypes (in terms of arguments and returns etc).
So something like the following is allowed:
// function 1
void test(int nn)
{
// code
}
// function 2
void test(double dd)
{
// code
}
//function 3
int test(int n1, int n2, double dd)
{
// code
return 0;
}
whereas something like below is not allowed:
// function 1
void test(int nn)
{
// code
}
// function 2
void test(int ii)
{
// some other code
}
Note also that if you have overloaded/multiple functions of same name (with different prototypes as in the first example), all the functions become accessible from other Origin C code. However, from LabTalk, such as from script window, only one of the functions of that name becomes available. It is not necessarily the first function by the way in the code, that becomes available in script.
Easwar
OriginLab
Edited by - easwar on 04/02/2005 08:38:39 AM