From: Jerry Petrey <"jdpetrey<NOSPAM>"@raytheon.com>
Subject: Re: Hex ouput
Date: Thu, 23 Oct 2003 08:39:06 -0700
Date: 2003-10-23T08:39:06-07:00 [thread overview]
Message-ID: <3F97F61A.13088097@raytheon.com> (raw)
In-Reply-To: bn8ldm$php2@cui1.lmms.lmco.com
Xenos wrote:
>
>
> Thanks, Ed. I didn't think to just the RM as I have yet to get a hardcopy
> one for '95. Do you know where I can purchase one? I hate trying to read
> PDF (et. al.) files on my computer. I much prefer books.
>
> DrX.
You can find the Ada LRM at Amazon, among other places:
http://www.amazon.com/exec/obidos/tg/detail/-/3540430385/qid=1066923022/sr=1-1/ref=sr_1_1/102-5165323-3419326?v=glance&s=books
Also if you want to output hex numbers without the 16#xxxx# format, here is a
short routine to do that:
procedure Hex_Print (Num : in Integer;
Num_Of_Digits : in Positive) is
Temp_Str : String (1 .. Num_Of_Digits + 5) := (others => '0');
New_Str : String (1 .. Num_Of_Digits) := (others => '0');
First_Digit : Positive;
begin
Put (To => Temp_Str, Item => Num, Base => 16);
for I in 1 .. Num_Of_Digits + 4 loop
if Temp_Str (I) = '#' then
First_Digit := I + 1;
exit;
end if;
end loop;
New_Str (First_Digit - 4 .. Num_Of_Digits) :=
Temp_Str (First_Digit .. Num_Of_Digits + 4);
Put (New_Str);
end Hex_Print;
It could be improved some but should help you get the idea.
Jerry
--
---------------------------------------------------------------------------------
-- Jerry Petrey
-- Senior Principal Systems Engineer - Navigation (GPS/INS), Guidance, &
Control
-- Raytheon Missile Systems - Member Team Ada & Team Forth
-- NOTE: please remove <NOSPAM> in email address to reply
---------------------------------------------------------------------------------
next prev parent reply other threads:[~2003-10-23 15:39 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-10-22 16:56 Hex ouput Xenos
2003-10-22 17:19 ` Ed Falis
2003-10-23 13:34 ` Xenos
2003-10-23 14:14 ` Hard copy of Ada RM (was: Hex ouput) Ed Falis
2003-10-23 14:57 ` Xenos
2003-10-24 6:24 ` Dirk Craeynest
2003-10-23 15:39 ` Jerry Petrey [this message]
2003-10-23 19:51 ` Hex ouput Xenos
2003-10-23 21:18 ` Stephen Leake
2003-10-24 7:36 ` Dmitry A. Kazakov
2003-10-24 1:09 ` Jeffrey Carter
2003-10-24 15:08 ` Robert Spooner
2003-10-25 0:39 ` Jeffrey Carter
2003-10-26 1:16 ` Jeffrey Carter
2003-10-23 23:49 ` Randy Brukardt
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox