Pro*C problem returning a double
From: Raz <raz1980_at_yahoo.com>
Date: 26 Jun 2003 13:08:17 -0700
Message-ID: <eb03a69e.0306261208.47cf575c_at_posting.google.com>
I have a C module that calls a Pro*C module that should return a double. The Pro*C compiler changes the double to a pointer to double in the pre-compiler. This causes my program to fail. Below is some suedo code:
Date: 26 Jun 2003 13:08:17 -0700
Message-ID: <eb03a69e.0306261208.47cf575c_at_posting.google.com>
I have a C module that calls a Pro*C module that should return a double. The Pro*C compiler changes the double to a pointer to double in the pre-compiler. This causes my program to fail. Below is some suedo code:
cmodule.c
main()
{
...
double var1 = get_value();
...
}
proc_module.pc
double get_value()
{
...
double var2 = 98;
return var2;
}
This gets pre-compiled to:
proc_module.c
double get_value();
...
double var2 = 98;
return *var2;
}
This causes the program to fail miserably. This does not happen with long or float. Any ideas whay this is happening? Any help would be appreciated (for now I pass in a pointer and set the variable instead of returning the value.
Thanks
Bob
Received on Thu Jun 26 2003 - 22:08:17 CEST