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.9 required=5.0 tests=BAYES_00 autolearn=unavailable autolearn_force=no version=3.4.4 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Jeffrey Carter Newsgroups: comp.lang.ada Subject: Re: casting types Date: Tue, 30 Sep 2014 19:06:55 -0700 Organization: Also freenews.netfront.net; news.tornevall.net; news.eternal-september.org Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Injection-Date: Wed, 1 Oct 2014 02:06:56 +0000 (UTC) Injection-Info: mx05.eternal-september.org; posting-host="2cce0a40174b83136a5e3a34df5b5ee7"; logging-data="28251"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19pwdAqATZ9g7fSqcKps8z8tnwH2nrtSoE=" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.1.0 In-Reply-To: Cancel-Lock: sha1:kbNxO71kR1PfIn86vedrg+yw2TQ= Xref: number.nntp.giganews.com comp.lang.ada:189262 Date: 2014-09-30T19:06:55-07:00 List-Id: On 09/30/2014 06:49 PM, Stribor40 wrote: > > How would I cast var1 to become 123 but still be able to subtract it from var1 and keep float type? You can't, since there is no casting in Ada. However, you might find the 'Truncation attribute function useful. http://www.adaic.org/resources/add_content/standards/12rm/html/RM-A-5-3.html -- Jeff Carter "Nobody expects the Spanish Inquisition!" Monty Python's Flying Circus 22