Adi-generic runtime

How would you create a generic instance at run time, and not at compile time. An example without using a new one.

0
source share
1 answer

You cannot do this without using new . You can do this in any declarative section, however this common will only exist for the duration of this declarative section.

for example (not compiled ada-like pseudocode):

 get(length) declare package stack is new stack_generic (max_stack_size => length); begin stack.push(); ... end; -- stack package no longer in scope. 

Does it help?

+2
source

All Articles