isql exponential format of numbers has zero pad on windows [CORE1171] #1594
Labels
affect-version: 0.9
affect-version: 0.9.4
affect-version: 0.9.5
affect-version: 1.0 RC1
affect-version: 1.0 RC2
affect-version: 1.0.0
affect-version: 1.0.1
affect-version: 1.0.2
affect-version: 1.0.3
affect-version: 1.5 Alpha 3
affect-version: 1.5 Alpha 4
affect-version: 1.5 Alpha 5
affect-version: 1.5 Beta 1
affect-version: 1.5 Beta 2
affect-version: 1.5 Beta 3
affect-version: 1.5 Beta 4
affect-version: 1.5 RC1
affect-version: 1.5 RC2
affect-version: 1.5 RC3
affect-version: 1.5 RC4
affect-version: 1.5 RC5
affect-version: 1.5 RC6
affect-version: 1.5 RC7
affect-version: 1.5 RC8
affect-version: 1.5 RC9
affect-version: 1.5.0
affect-version: 1.5.1
affect-version: 1.5.2
affect-version: 1.5.3
affect-version: 1.5.4
affect-version: 2.0 Beta 1
affect-version: 2.0 Beta 2
affect-version: 2.0 RC1
affect-version: 2.0 RC2
affect-version: 2.0 RC3
affect-version: 2.0 RC4
affect-version: 2.0 RC5
affect-version: 2.0.0
component: isql
fix-version: 2.1.3
fix-version: 2.5 Beta 2
priority: minor
qa: done successfully
type: improvement
Submitted by: Bill Oliver (verbguy)
Assigned to: Claudio Valderrama C. (robocop)
Is related to QA260
Entering a tracker, as this might be a useful snippet to add to Firebird 2+.
Exponential formatting of numbers is different between Windows and Unix for 2-digit exponents. On Windows there is a zero pad, so that the exponent is always 3 digits. For example:
select cast ('-2.488355210669293e+39' as double precision) from rdb$database;
On Unix you get
-2.488355210669293e+39
On Windows you get
-2.488355210669293e+039
With the Microsoft and Intel compilers, the default behavior is to zero pad. This differs on Unix.
It would be nice to to have the zero pad removed on Windows. This would make managing differences between hosts easier. Tom has fixed this in ISQL with the following code:
#if defined(SAS_FIREBIRD) && defined(SSA_OS_WIN)
void unix_exponent_formatting(char * p) {
}
#define UNIX_EXPONENT_FORMATTING( x ) unix_exponent_formatting( x );
#else
#define UNIX_EXPONENT_FORMATTING( x )
#endif
and this is called from print_item() for types of SQL_FLOAT and SQL_DOUBLE:
Commits: 024d840 d69d80f
The text was updated successfully, but these errors were encountered: