SICS-785 Use scientific notation to return small floats in SICSvariables.

This commit is contained in:
Ferdi Franceschini
2014-09-19 14:53:06 +10:00
parent cca9029270
commit 9f8d01bebe

View File

@ -456,7 +456,7 @@ int VarWrapper(SConnection * pCon, SicsInterp * pInterp, void *pData,
return 1; return 1;
case veFloat: case veFloat:
VarGetFloat(pVar, &fVal); VarGetFloat(pVar, &fVal);
snprintf(pBueffel,sizeof(pBueffel)-1, "%s = %f", argv[0], fVal); snprintf(pBueffel,sizeof(pBueffel)-1, "%s = %g", argv[0], fVal);
SCWrite(pCon, pBueffel, eValue); SCWrite(pCon, pBueffel, eValue);
DeleteTokenList(pList); DeleteTokenList(pList);
return 1; return 1;