|
From: Jeffrey H. <jef...@aj...> - 2000-10-04 01:43:49
|
lv...@ca... wrote: > > According to Don Porter <dg...@ca...>: > > :strtod() is buggy. I recommend that Tcl's configure script also test > :for the presence of a C9X strtod(), and replace it with the compat/strtod.c > :version as well. > > It sure is a shame to put yet another road block in the way of international > standards by replacing standard C behavior with a subset of that behavior. > > Wouldn't we rather see the compat/strtod.c upgraded to take the new format, > instead of telling people though they can use such numbers with perl, python, > etc. they are not permitted to use them with tcl? Actually, Tcl behaves right now the same as Perl, and perhaps the same as Python (don't have it on all systems to check). Linux 6.x Perl 5.005_03 gives: zamora [~] 7 % perl -e '$a = "0x1.8p0"; $a++; print "$a\n";' 2.5 Solaris 5.7 Perl 5.005_03 gives: jupiter [~] 333 % perl -e '$a = "0x1.8p0"; $a++; print "$a\n";' 1 And it's even worse depending on how you operate on $a for perl due to the way it more leniently tries to interpret data sometimes. I do think we should strive for consistency, either by preventing this ISO (not POSIX) extension from being recognized in Tcl, or by accepting it everywhere. We may want to lean toward extending it though, as we also have had numerous requests to support formats like 0d09 (dec) 0b011101 (bin), as some other languages support. -- Jeffrey Hobbs The Tcl Guy hobbs at ajubasolutions.com Ajuba Solutions (née Scriptics) -- The TclCore mailing list is sponsored by Ajuba Solutions To unsubscribe: email tcl...@aj... with the word UNSUBSCRIBE as the subject. |