char *displayPt( UInt16 i )
{
char *pS, *eS, *nS, *line1, *line2,s[50];
pS and nS look unnecessary. you just copy their values into line1 & line2 anyway, might as well just set them in line1 and line2.
//reserve memory
//build line #2
doubleToString(nS,point.northing,decimal);
nS=strPadLeft(nS,14); //value OK at this point
doubleToString(eS,point.easting,decimal); // I'm using david bray's conversion function
eS=strPadLeft(eS,14); // nS now equals eS for some reason.
your problem is pretty clearly in either doubleToString() or strPadLeft(). it's hard to say which since you didn't post that code.
I'm going to say it's probably strPadLeft() since you're assigning the pointer a value from that function.
why do you set the pointer = to a parameter you pass into strPadLeft()?
If you're just changing the value of the string, you should just have:
strPadLeft(ns,14);
in the same way that StrCopy() isn't used as
line1 = StrCopy( line1, pS );
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
