From: Butler, K. <Kev...@st...> - 2001-09-21 20:57:09
|
Tom Dyas suggested I send this possible bug report to this list: > I'm enjoying trying out your fine DB program. > > One bug, perhaps? When I enter a value in a numeric field that begins > with zero (like "0123") it either gets stored as a completely different > number when I save (like "52") or I get an error message that the data is > the wrong type for the field. > > Obviously, I can work around this. But since the numeric field default to > a value of "0", it's tempting just to add digits to the existing field, > which leaves me with the leading zero problem. > > Thanks, in any event! > > Kevin Butler kev...@st... |
From: Thomas M. <tw...@s2...> - 2001-09-22 10:36:56
|
Hi, On Friday 21 September 2001 22:55, Butler, Kevin wrote: I just tried to reproduce the leading zero problem. 1. it only occurs in number fields. 2. it is a "feature", that is, you can use a leading zero to enter octal numbers, and a leading 0x to enter hexadecimal numbers. The code apparently just uses the standard C function to convert strings to integers. The question now is whether this is a useful feature or not. I think it is not, because it is not intuitive for non-programmers. MfG :-) Thomas |
From: Harald Hanche-O. <ha...@ma...> - 2001-09-22 14:26:41
|
+ Thomas Mueller <tw...@s2...>: | 2. it is a "feature", that is, you can use a leading zero to enter | octal numbers, and a leading 0x to enter hexadecimal numbers. That was my first thought too, but from the original message... + "Butler, Kevin" <Kev...@st...>: | > When I enter a value in a numeric field that begins with zero | > (like "0123") it either gets stored as a completely different | > number when I save (like "52") ... I inferred (wrongly, as it turned out) that entering 0123 produced 52, so I dismissed that theory out of hand, and turned my attention elsewhere, since this was clearly beyond my ken. Which goes to show that it is always better to give accurate information when reporting a bug. But I digress... 8-) + Carson Wilcox <car...@ya...>: | I don't see a problem with this actually, since it's an int field, | not an octal field and an int is a decimal value. Well, I feel like disagreeing here: An integer is just an integer, there is nothing decimal about it. Decimal is a word we apply to a specific representation of integers, which is a different thing. The feature is clearly somewhat problematic, as it confuses users. At the very least, it should be documented. But in any case I think it is of very limited value as long as the result is always shown as decimal.[1] If an option were added to display some numeric fields as octal or hexadecimal, then perhaps this feature might be useful to some. [1] Reminds me of an old operating system I once worked on in which some parameters were expected to be octal on input, and some were expected to be decimal. Similarly, some were displayed as octal and some as decimal, with no indication as to which was which. And here is the killer: The input and output number bases for some paramterers were different!. - Harald |
From: Chalain Marc<mar...@vo...> - 2001-09-24 12:14:38
|
Are you sur that is not 83:) In fact 0123 is the octal value of 83d. Integer Type Field accept decimal, hexdecimal and octal: 123 -> 123d 0123 -> 83d 0x123 -> 291d It's not a bug, it's a Tom's feature, and i like it. Salut, Marc. __________________________________________________ Voila vous propose une boite aux lettres gratuite sur Voila Mail: http://mail.voila.fr |
From: Carson W. <car...@ya...> - 2001-09-24 17:28:41
|
I agree that this is correct , IMHO Carson --- Chalain Marc <mar...@vo...> wrote: > Are you sur that is not 83:) > In fact 0123 is the octal value of 83d. > Integer Type Field accept decimal, hexdecimal and > octal: > 123 -> 123d > 0123 -> 83d > 0x123 -> 291d > It's not a bug, it's a Tom's feature, and i like it. > Salut, > Marc. > > > __________________________________________________ > Voila vous propose une boite aux lettres gratuite > sur Voila Mail: > http://mail.voila.fr > > > > > _______________________________________________ > Pilot-db-list mailing list > Pil...@li... > https://lists.sourceforge.net/lists/listinfo/pilot-db-list __________________________________________________ Do You Yahoo!? Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger. http://im.yahoo.com |