8 File Storage

Data Storage Requirements

When storing data, it is possible to optimize the use of your storage medium by minimizing the amount of unused space. The best way to do this is to create your files so they are suited to the amount of data you wish to store and are suited to storage medium capacities.

The following tables indicate how many bytes are needed to store each type of variable.

Simple Variables

Real precision
8 bytes.
Short precision
4 bytes.
Integer precision
4 bytes.
Dinteger
6 bytes.
String
1 byte per character (rounded to an even integer) + 4 bytes (+ 4 additional bytes each time string crosses into a new defined record).
Array Variables

Real precision
8 bytes x dimensioned number of elements.
Short precision
4 bytes x dimensioned number of elements.
Integer precision
4 bytes x dimensioned number of elements.
String
4 bytes per element + total needed for all strings as defined above.
By summing up how many bytes of storage your data requires, you can tailor your file and logical record lengths to suit your needs and minimize waste.


Eloquence Language Manual - 19 DEC 2002