comp.lang.ada
 help / color / mirror / Atom feed
From: "Stephane Richard" <stephane.richard@verizon.net>
Subject: Question about Ada and constant Arrays
Date: Mon, 10 Nov 2003 16:49:17 GMT
Date: 2003-11-10T16:49:17+00:00	[thread overview]
Message-ID: <hkPrb.6700$bQ3.6409@nwrdny03.gnilink.net> (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






             reply	other threads:[~2003-11-10 16:49 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-10 16:49 Stephane Richard [this message]
2003-11-10 17:07 ` Question about Ada and constant Arrays 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
replies disabled

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