On 2023-01-26 20:25, L. B. wrote:
> Hello,
>
> I'm having issues with cursors of doubly linked lists (erroneous
> memory access exceptions).
Sounds like a rather common programming error, perhaps trying to
dereference pointers that are null.
> So I'm wondering whether the pragmas might solve the problems.
That is very unlikely, IMO.
> What is the purpose of the pragmas defined in the package like
>
> pragma Preelaborate(Doubly_Linked_Lists);
> pragma Preelaborable_Initialization(List);
> pragma Preelaborable_Initialization(Cursor);
They tell the Ada compiler that the named package and the named types
will and should have very simple initialization requirements (default
initialization, for the types). They have no (visible) effect on how the
program executes and, AIUI, cannot be related to your memory access
exceptions.
For more explanation, see the Ada RM,
http://www.ada-auth.org/standards/22rm/html/RM-10-2-1.html.
If you would like help on the memory access exceptions, do describe the
problem more in detail here, and perhaps someone can help.