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=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,49f7dd1bad1910ff,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-10-13 15:23:53 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: bleakcabal@gdnmail.net (Bleakcabal) Newsgroups: comp.lang.ada Subject: Problems with Ada.Text_IO and strings. Date: 13 Oct 2003 15:23:53 -0700 Organization: http://groups.google.com Message-ID: <8336eb21.0310131423.7410e1ec@posting.google.com> NNTP-Posting-Host: 66.36.146.170 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1066083833 31457 127.0.0.1 (13 Oct 2003 22:23:53 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Mon, 13 Oct 2003 22:23:53 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:792 Date: 2003-10-13T15:23:53-07:00 List-Id: Hi, im new to Ada and I am writing my first program trying to "get" Ada. My small program ask for input from the user. I read it using : Ada.Text_IO.Get_Line (MyType.Name, NameLength); This data is then stored inside an array of a type I have declared : type MyType is record �����name : string(1..20); �����adress : string(1..40); �����telephone : natural; end record; Later in the program I output this information using : Ada.Text_IO.Put (MyType.name); My problem is this : when I output the name, part of the string is filled with "garbage" characters. If I fill the string with 20 characters I get no garbage. But when I write a name that's about 10 characters long, I get about 10 characters of garbage. Im using Gnat as my Ada compiler if that makes a difference. Any help would be appreciated. Thank you in advance.