TELECOM Digest OnLine - Sorted: Re: Leading Zeros?


Re: Leading Zeros?


Michael D. Sullivan (userid@camsul.example.invalid)
Wed, 16 Feb 2005 08:17:16 GMT

In article <telecom24.70.4@telecom-digest.org>, siegman@stanford.edu
says:

> I've just encountered an annoying hassle where proper handling of
> archival bibliographic data requires keeping track of leading zeros in
> ID numbers; and these seem like informed groups to ask if anyone has
> comments or observations on other electronic or online systems that
> require or even allow leading zeros?

> Specifically the Am Phys Soc now identifies articles not by volume and
> page numbers but by volume and a six-digit "article number" which
> sometimes does and sometimes does not have an initial zero -- but if
> it does you _must_ keep it for various bibliographic and online
> citations to work properly. A few quick tests show that the default
> behavior is to automatically and irretrievably discard leading zeros
> on integer numbers keyed into an Excel worksheet cell or a Mathematic
> list. One of my bank accounts prints my account number with three
> leading zeros, but won't accept them in the Account Number field for
> online login. On the other hand for another ID card I have, you
> _must_ type the leading zeros.

> Are there any kind of published refs or computer standards or human
> interface guidelines on the use of leading zeros? ZIP codes use 'em,
> phone numbers don't?

The application typically must be set up to handle the ID numbers as
character strings. In the case of excel spreadsheets, when entering
the ID numbers directly, put a single quote before the entry (e.g.,
'00123) to treat it as a string. It should be possible to devise data
entry dialogs that handle this correctly without having to put in the
quote symbol.

Early in the days of the WWW, some online forms made the mistake of
treating entries beginning with 0 as octal, resulting in the rejection
of entries with digits greater than 7 and the translation of others to
completely unintended values (e.g., 050 would be 50 base 8, or 40 base
10). Any database program should have a simple way to deal with this.
For example, input the data as a character string, validate the
characters as permissible, such as 0-9, require reentry if not valid,
and then translate to whatever format is used internally.

-- 
Michael D. Sullivan
Bethesda, MD, USA
Replace "example.invalid" with ".com".

Post Followup Article Use your browser's quoting feature to quote article into reply
Go to Next message: Michael D. Sullivan: "Re: Verizon Plans to Offer "Naked DSL" on 4/5 of its Wirelines"
Go to Previous message: Barry Margolin: "Re: Leading Zeros?"
May be in reply to: AES: "Leading Zeros?"
Next in thread: AES: "Re: Leading Zeros?"
TELECOM Digest: Home Page