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, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7e29322ee367c19d X-Google-Attributes: gid103376,public From: Jim Rogers Subject: Re: Unchecked_Conversion on different sized types -- problem? Date: 2000/01/13 Message-ID: <85lht1$l8c$1@nnrp1.deja.com>#1/1 X-Deja-AN: 572234506 References: X-Http-Proxy: 1.1 x31.deja.com:80 (Squid/1.1.22) for client 205.170.64.211 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Thu Jan 13 22:00:11 2000 GMT X-MyDeja-Info: XMYDJUIDada_daddy Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; EXCITE) Date: 2000-01-13T00:00:00+00:00 List-Id: In article , "Mike Silva" wrote: > To do some prototyping I'm extending Michael Feldman's ANSI screen package a > bit, to allow colors, etc, and I ran into a question. I've enumerated > various attributes and set the enumerations to the corresponding ANSI codes, > and I'm using UC to convert the enumerated types to an Integer, to send via > Text_IO.Put(). I get a warning (GNAT 3.12p) that the types for the UC have > different sizes (not surprising), and I'm wondering if UC always does the > "right" thing here, i.e. zero-extending the smaller enum type when > converting to an Integer. The simple solution to this is to declare a set of integer constants, not enumerated types. The constants will require no conversions at all. Jim Rogers Colorado Springs, Colorado Sent via Deja.com http://www.deja.com/ Before you buy.