Corretta gestione del segno meno nelle picture

git-svn-id: svn://10.65.10.50/trunk@2634 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1996-02-23 11:38:20 +00:00
parent 894fe49825
commit 9364f68d85

@ -1342,13 +1342,14 @@ char* real::string(const char *picture) const
TString v (string());
TString f (picture);
char decsep = ',';
char decsep = ','; // Separatore dei decimali
if (f[f.len() - 1] == 'E')
{
f.rtrim(1);
decsep = '.';
}
const char migsep = decsep == '.' ? ',' : '.'; // Separatore delle migliaia
const int voluti = get_picture_decimals (f, decsep);
const int virgola = v.find ('.'); // v e' la nostra cifra, certamente in english format
@ -1375,7 +1376,7 @@ char* real::string(const char *picture) const
if (c == '@')
c = (z == '@') ? '0' : ' ';
else
if (c == '-' && f[i+1] == decsep)
if (c == '-' && f[i+1] == migsep) // Altrimenti -100 diventa -.100
{
f[i+1] = '-';
c = ' ';