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=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,cebf5cf473e617ff X-Google-Attributes: gid103376,public From: "Steve Doiel" Subject: Re: Naive question Date: 1998/08/27 Message-ID: <35e61751.0@news.pacifier.com>#1/1 X-Deja-AN: 385493009 References: <35DF1997.3CB29CD6@tech.swh.lv> Newsgroups: comp.lang.ada X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 Date: 1998-08-27T00:00:00+00:00 List-Id: Use: i : Integer := Character'Pos( 'M' ); to get the ordinal value of a character. i : Integer := Integer'Value ("12"); Assignes the value of 12 to i. SteveD Maxim Senin wrote in message <35DF1997.3CB29CD6@tech.swh.lv>... >How to assign value to integer like in C: int i = 'm';? > >I tried > i : Integer := Integer'Value ("m"); >but it throws CONSTRAINT_ERROR. > >Thanks >