comp.lang.ada
 help / color / mirror / Atom feed
* Question about Ada and constant Arrays
@ 2003-11-10 16:49 Stephane Richard
  2003-11-10 17:07 ` Preben Randhol
  2003-11-11  9:34 ` Lutz Donnerhacke
  0 siblings, 2 replies; 7+ messages in thread
From: Stephane Richard @ 2003-11-10 16:49 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Hi everyone,  As the subject line says, the object of the question would be.

I'd like to make an constant array of a given record type and initialize it
upon it's creation.

Type TestRecord Is
Record
        Enabled: Boolean;
        Name:    String(60);
        Value:     Integer;
End Record;

Constant TestArray(1..5): TestRecord = ( (True, "Test1", 1),:
                                                                (False,
"Test2", 2),:
                                                                (False,
"Test3", 4),:
                                                                (False,
"Test4", 8),:
                                                                (True,
"Test5", 16) );

Or something similar to that.  Is that possible? and How?

Thank you all :-).

-- 
"To err is human.  To really screw up, you need C++!"

St�phane Richard
"Ada World" Webmaster
http://www.adaworld.com






^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2003-11-11  9:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-10 16:49 Question about Ada and constant Arrays Stephane Richard
2003-11-10 17:07 ` Preben Randhol
2003-11-10 17:10   ` Stephane Richard
2003-11-10 17:13     ` Preben Randhol
2003-11-10 17:11   ` Preben Randhol
2003-11-11  5:41   ` Nick Roberts
2003-11-11  9:34 ` Lutz Donnerhacke

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox