I must have been mis-understanding the point.

>>>>> "MSD" == Michael S Davis <[EMAIL PROTECTED]> writes:
MSD> The problem is that the calling instruction is evaluated as
MSD> zero: x = StrToLL(char *str).  

Okey, please give me how you proto-type declared StrToLL() function.

As for default, when you did not proto-type declare StrToLL()
function, C compiler will treat StrToLL() as if it's being declared
as:

int     StrToLL( int );

So, if you want LL to be returned, and char * to be passed, you MUST
have the correct proto-type declaration like:

unsigned long long      StrToLL( char *str );

# Some people beleave we can skip (char *str), but we shouldn't.
# In unix, int is 32bit, which is exactly the size of pointer,
# but this case, Palm's int is 16bits and pointer is 32.


MSD> Can anyone shed light on this problem?  What is the solution?
MSD> I cannot return LL values from a function.
MSD> I cannot access LL values properly, if global.

I still can not point out the "Exact" point, because I can't see
your exact C code. But I do beleave it's problem of declaration and
function proto-typing.

I beleave so because, when I was very beginner of C, which is about
10 years ago, I used to have this kind of same problems using
"double." Many of the mathmatical libraries did not work properly.
It was because I did not include <math.h>, which contained function
declaration saying like

        double  sin( double angle );

but since I did not include math.h, C compiler "defaultly" treated
sin() as if it's being declared

        int     sin( int angle );

and run into trouble( mainly, ether return value is always 0, or
looks as if it's random number ).

Reply via email to