On Thu, 26 Aug 1999, Holger Klawitter wrote:

> Mike Davis wrote:
> > 
> > I call the function StrToLL, below, with the following call like:
> > 
> > unsigned long long x;
> > x = StrToLL(inputStr);  // string filled with input from field
> > FrmCustomAlert(altNotice, "x=", StrIToA(buf, x), "Ok!");
> > 
> > I make this call to convert a string to a Long.  The function
> > works because I can see the value in the Debug Popup form in the
> > function. But when I check the return value, right after the call,
> > with the Debug Popup form, the value is zero.
> > 
> 
> 'buf' is probably part of the stack. String constants passed to FrmCustomAlert
> should be global. So FrmCustomAlert currupts the stack and may or may not
> change x. Put 'buf' in global space (either declaring it global or
> put buf on heap by buf = MemPtrNew(sizeof(Char)*12)) and it will work.

I must not be asking the question properly.  

I ONLY have buf, StrToI and FrmCustomAlert because the LL paramater
is not being passed back correctly.  So, buf, StrToI and FrmCustomAlert
have nothing to do with the problem.

The problem is "why is the returned LL value zero, when it is 'returned'
by the function?"  The problem is NOT  why does the FrmCustomAlert not
display the correct value.  In fact, it does.

The returned value is zero even with buf, StrAToI and FrmCustomAlert
removed.  Again, they are only there for debug.

> 
> Regards
>       Holger Klawitter
> -- 
> Holger Klawitter                                     +49 (0)251 484 0637
> [EMAIL PROTECTED]                             http://www.klawitter.de/
> 
> 
> 
> 

----------------------------------------------------
Shoot-to-Win

Protect the 2nd Amendment
----------------------------------------------------

Reply via email to