I have a global array variable that is enumerated with 'a'..'z'. If I wanted to initialize some entries in the variable declaration, I’d usually do the following:
var
Example: Array['a'..'z'] of String = ('Example one', 'two', 'three');
Is there a way to initialize just, say, ‘g’, ‘p’, ‘o’, and ‘y’, right there in the variable declaration, or do I have to do that via some function/procedure in the implementation part?
Might there even be a much smarter way to achieve what I want?
You cannot initialize only certain elements right there. The correct way of doing this would be in the
initializationsection, written after theimplementation: