DEVELOPMENT EDITION · 769442725406
Library Reference
On this page

Verada.Storage

The machine's memory as the library's contracts state it: no string, text or container holds Length_Bound (2⁶⁰) or more elements.

Read the family guide for representation, selection and resource rules. The complete declaration page retains exact signatures/contracts; the source specification is the implementation baseline.

Availability and ownership

Only memory limits a string, a text or a container. The library states every length below Length_Bound, a fact of the machine (no memory holds 2⁶⁰ elements), so that the length of two of them joined is still a Natural. An operation that makes a longer one calls Reserve first, which raises Storage_Error, as an allocation the heap cannot make does; so no library operation has a precondition on the sizes it is given. A program's own containers can call Reserve the same way.

Import and instantiate

with Verada.Storage;
...
Verada.Storage.Reserve (Long_Long_Long_Integer (Length (A)) + Long_Long_Long_Integer (Length (B)));

API 001

Length_Bound (declaration) — The bound below which every length in memory is: 2⁶⁰.

Declared interface:

Length_Bound : constant := 2 ** 60;

API 002

Reserve (declaration) — Room for Count elements, about to be made: Storage_Error when memory cannot hold them. Count is a Long_Long_Long_Integer, so that a sum or a product of lengths is passed without overflowing.

On normal return the declared contract establishes:

Count < Length_Bound