From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.5 required=3.0 tests=BAYES_05,MSGID_SHORT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 20 Sep 91 14:03:15 GMT From: ftpbox!mothost!motcid!bachww@uunet.uu.net (Bud Bach) Subject: Re: How to put an integer into a char? Message-ID: <5480@melon21.UUCP> List-Id: black@beno.CSS.GOV (Mike Black) writes: >I recently took an Ada class and was trying to use a DOS call to >make the terminal beep on an input error. However, I couldn't >find a (easy) way to put a CTRL-G (ASCII 7) into a CHARACTER object. >The ASCII package is apparently not defined for Alsys 4.3 on MS-DOS. >So, is there a way to do this folks? >Mike... Mike, I suspect that your problem may be that you are trying to "with" package "ascii". "Ascii" is defined within the scope of standard and may not be explicitly withed. Here is an example for you: with text_io; procedure beep is bell : constant character := ascii.bel; begin text_io.put (bell); end beep; The less elegent way to do this would be: with text_io; procedure beep is bell : constant character := character'val(7); ---------------- begin text_io.put (bell); end beep; -- Bud -- Bud Bach - Consultant c/o Motorola 708 632-6611 Cellular Infrastructure Group ...!uunet!motcid!bachww or 1501 W. Shure Drive, MS-1235 bachww%motcid@uunet.uu.net Arlington Heights, IL 60004