From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: *** X-Spam-Status: No, score=3.8 required=5.0 tests=BAYES_00,INVALID_MSGID, RATWARE_MS_HASH,RATWARE_OUTLOOK_NONAME autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,a6beb80151a3525b X-Google-Attributes: gid103376,public From: "Joakim Olsson" Subject: Re: Constrained Character Subtype Date: 1997/03/13 Message-ID: <01bc2fe5$89d3b2e0$045cf482@default>#1/1 X-Deja-AN: 225301661 References: <33270944.588B@primenet.com> Organization: - Newsgroups: comp.lang.ada NNTP-Posting-User: s-252009 Date: 1997-03-13T00:00:00+00:00 List-Id: Tracy Fletcher wrote in article <33270944.588B@primenet.com>... The "TWO" in the if-statement below must be in uppercase so if you gonna test a string you first have to convert it to UPPERCASE. this way you can test diffrent strings or chatacter with Ada ENUMERATION-type, You can't use numbers or '_' in the beginning of the value. You can also try out the Ada.Strings.Unbounded std-package and with it create a array of strings in different length. PS. I've compiled and linked it, it works... Se you in the Ada-web /joakim the swed... with Ada.Text_IO; procedure test is type TST1 is ( one, two, three ); begin for I in TST1 loop if "TWO" = TST1'image(I) then Ada.Text_IO.Put_Line("OK"); end if; end loop; end;