Hi Everyone,
I am getting a StringMgr.h Null string passed error when I try to use
FlpFToA twice. I created a function to use FlpFToA here:
void MyFloatToString(float FloatNumber, char *ReturnString)
{
char szBuffer2[32];
FlpCompDouble fd2;
fd2.d = FloatNumber;
FlpFToA(fd2.fd, ReturnString);
}
What I call in my program is below (RecordPointer->Sodium and
RecordPointer->Fluid are floats; szBuffer2 and szBuffer are char[32];
RecordPointer->name is a char *.). This gives me the error.
MyFloatToString(RecordPointer->Sodium, szBuffer2);
MyFloatToString(RecordPointer->Fluid, szBuffer);
StrPrintF(PrintString, "Name: %s Fluid: %s",
RecordPointer->name, szBuffer);
SetFieldText(MainResultField, PrintString);
However, if I only make one call to MyFloatToString, the program works
fine.
For instance, these two work:
// This works
MyFloatToString(RecordPointer->Fluid, szBuffer);
StrPrintF(PrintString, "Name: %s Fluid: %s",
RecordPointer->name, szBuffer);
SetFieldText(MainResultField, PrintString);
--- (different iteration of code)
// This works
MyFloatToString(RecordPointer->Sodium, szBuffer2);
StrPrintF(PrintString, "Name: %s Fluid: %s",
RecordPointer->name, szBuffer2);
SetFieldText(MainResultField, PrintString);
Any ideas?
Thanks,
Katie
*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*
Katie A. (Moor) Siek
PhD Candidate (812) 856-2107
Indiana University [EMAIL PROTECTED]
Computer Science Department http://www.cs.indiana.edu/~ksiek
*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*~~*
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/