rspec/rules/S1619/description.adoc
2021-02-02 16:54:43 +01:00

21 lines
471 B
Plaintext

When storing numeric fields, using an odd number of digits allows the sign to be included in the storage area without wasting any space.
For example the number -1234567, when packed as 7 digits is stored as follows.
----
1357
246-
----
thus taking up only 4 data slots. but when packed as 8 characters it uses 5 data slots
----
02467
0135-
----
or when 7 digits, non-packed, it will be stored as 8 data slots, including the sign.
----
FFFFFFF6
12345670
----