TELECOM Digest OnLine - Sorted: Re: Leading Zeros?


Re: Leading Zeros?


Justin Time (a_user2000@yahoo.com)
16 Feb 2005 05:22:56 -0800

Suppression of leading zeroes in a number stored electronically was a
design decision made at the initial concept meetings for the package.
As far as convention, again it's a choice. If you specify a string,
which is how numbers are stored and referenced in most programs as
variable length, then you will use less storage to hold a number.

As an example, if you have a right justified field that holds 15
digits and the string contains only 7 digits after the first non-zero
digit, you don't have to store the 8 leading zeroes. If it is a fixed
length field, then you would be required to key in all 15 digits,
including leading zeroes.

There are several different ways to handle a variable length number in
a fixed length situation and it would be a good programming exercise
for a basic class.

Rodgers Platt

Post Followup Article Use your browser's quoting feature to quote article into reply
Go to Next message: Brad Houser: "Re: Leading Zeros?"
Go to Previous message: Robert Bonomi: "Re: Leading Zeros?"
May be in reply to: AES: "Leading Zeros?"
Next in thread: Brad Houser: "Re: Leading Zeros?"
TELECOM Digest: Home Page