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=2.0 required=5.0 tests=BAYES_20,FREEMAIL_FROM, HELO_NO_DOMAIN,MAILING_LIST_MULTI,RDNS_NONE,REPLYTO_WITHOUT_TO_CC, SPOOFED_FREEMAIL_NO_RDNS,URI_TRY_3LD autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fd27dd0e0e0523c6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-11-20 11:50:05 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fr.usenet-edu.net!usenet-edu.net!enst.fr!not-for-mail From: "Gautier direct_replies_not_read" Newsgroups: comp.lang.ada Subject: Re: pre-defined function convert hex to decimal? Date: Wed, 20 Nov 2002 19:49:47 +0000 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; format=flowed X-Trace: avanie.enst.fr 1037821803 47907 137.194.161.2 (20 Nov 2002 19:50:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 20 Nov 2002 19:50:03 +0000 (UTC) Return-Path: X-Originating-IP: [80.218.95.120] X-OriginalArrivalTime: 20 Nov 2002 19:49:47.0676 (UTC) FILETIME=[FB30A5C0:01C290CD] Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.13 Precedence: bulk List-Unsubscribe: , List-Id: comp.lang.ada mail<->news gateway List-Post: List-Help: List-Subscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:31138 Date: 2002-11-20T19:49:47+00:00 >is there a pre-defined function in ada that converts hex to decimal, >or do I have to write from scratch? thanks You can use the 'Image and 'Value attributes. E.g.: with Ada.Text_IO; procedure Test_hex_to_dec is begin Ada.Text_IO.Put( Integer'Image( Integer'Value("16#1A2B3C#") ) ); end; ________________________________________________________ Gautier -- http://www.mysunrise.ch/users/gdm/gsoft.htm NB: For a direct answer, address on the Web site! _________________________________________________________________ MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus