|
Size of Quantities and Amounts Stored in ACCPAC Plus FilesACCESS C, the language in which ACCPAC Plus is written, stores IC/IR/OE quantities and all amounts as extended precision numbers. These numbers are stored internally as whole numbers. Decimal points are ignored in stored numbers and simply used when displaying the number or getting a number from the user. A inventory quantity of one hundred items is stored in the item file as 10000, irrespective if fractional quantities in IC is turned on or off. When displayed on screen it is shown as 100.00 (with fractional quantities turned on) or 100 (with fractional quantities off). An amount of $10.00 is stored internally as 1000. If the IR company profile specifies that unit prices be used with 6 decimals an amount of ten dollars would be stored internally as 10000000. The theoretical maximum number that can be stored and used by the language is VERY, VERY large. However, the disk space used to store a number will depend on the size of the number stored. For two bytes an extended precision number can be 255, for three bytes we will be able to store 65535, in four bytes it is possible to store 16777215, for five bytes 4294967295, and six bytes storage would allow us to store the number 1099511627775 (or with separators 1,099,511,627,775). Theoretically the language can use up to 256 bytes to store numbers - just imagine the size of the number. However, in design of the data records the developer has to decide on a reasonable amount of space to set aside for the number to be stored in. In ACCPAC Plus six (6) bytes are usually set aside for storage of a number - the notable exception being currency conversion numbers which, being accurate to 7 decimals (so even a 1 to 1 conversion would store as 10000000), have 8 bytes set aside for storage. When designing the IR data files it made sense to limit the storage space of numbers to six bytes as the program would need to interface with IC, AP, GL and other systems for which the maximum space set aside for numbers are six bytes. For this reason any one number is limited to 99,999,999,999. This is less than the maximum number that can be stored in the space provided but is consistent with the maximum size allowed by ACCPAC Plus. To calculate the maximum number that can be entered and stored you must ignore decimal places. For example, if the company profile is set to 6 decimal places for unit price and you will receive up to 1,000 items, the maximum unit price has to be less than 0.999999 - that is 99999 x 100000, or 99,999,900,000 stored number. |