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,24e25468da85803b X-Google-Attributes: gid103376,public From: "Paul Van Bellinghen" Subject: Re: Conversion problem Date: 1997/08/01 Message-ID: <01bc9e12$7288d020$17a9f5cd@asip120>#1/1 X-Deja-AN: 261041496 References: <85344.mj14148@janus.swip.net> X-Server-Date: 1 Aug 1997 00:33:35 GMT Organization: Home Newsgroups: comp.lang.ada Date: 1997-08-01T00:33:35+00:00 List-Id: > > How do i convert Interfaces.Unsigned_16 to Standard.Integer? > a short (16 bit) unsigned integer is usually defined in the Unsigned_types package as either range 0 .. 2**16-1 for Ada 83 or mod 2**16 for Ada 95 to allow wrapping. You can usually just re-cast a variable of type unsigned_short to integer (integer (unsigned_16_variable)). However, I don't know how the type you are referring to is defined in your Interfaces package. You can always use an unsigned_conversion from type unsigned_16 to integer if you must.