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: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: Annoying behavior Date: Sat, 25 Apr 2015 11:10:38 +0300 Organization: Tidorum Ltd Message-ID: References: <47c7df1e-17c1-44cb-a455-43431f0d39cd@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net 9XzlpxDhHrHDZXIRN8rBhwqluC2hSgKZYsFpl13HtqNpvACE2O Cancel-Lock: sha1:uRw7RXK6bhwFQv5GyktJxF3+rk8= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:25615 Date: 2015-04-25T11:10:38+03:00 List-Id: On 15-04-25 10:15 , Laurent wrote: > On Saturday, April 25, 2015 at 6:50:17 AM UTC+2, Niklas Holsti wrote: >> On 15-04-25 00:40 , Laurent wrote: >>> Hi >>> >>> Trying to build a program which generates this type of txt files: >> >> Irrelevant. > >>> For the moment I try to get the part done which generates the >>> content in the middle of the file, >> >> Irrelevant. > > Point taken. Ok. Well, I could have been kinder, sorry. > Following this group for some time. Sometimes people > get flamed because they don't explain what they wanted to do. Yes, but that usually happens when they ask how to do some particular thing in Ada, which is somehow against the Ada style... say, "how can I use printf in Ada?" and the answerers would like to know the *real* need, to explain how to accomplish that in the Ada way. You had a problem with reading input, so it is irrelevant what the program is expected to output later on. > I don't like to have graffiti smeared all over the screen > when I read a message. Especially because there is nothing > to differentiate it. No I won't post on StackOverflow. > > BTW I would perhaps have been flamed by not providing some > compilable code. Again 50%... I didn't mean to object to the provision of compilable code, I object to having to read your whole post and try to understand it before seeing that you are referring to code that is posted elsewhere. > Sounds familiar. Had that one already. Thats why I tried the skip_line. Good, you made the right diagnosis and correction. >> Uncommenting your Skip_Line after the SIR_Type_IO.Get works perfectly >> for me, giving the output: > > Yes. No idea what I actually tried before, can't be the same I > wrote in my OP. Often happens when you (or I) have a problem. I once spent half a day inspecting the code I had written for some on-board software for a satellite-born instrument, because the validation people assured me that in a certain situation, a certain output was 2 and not 1. In the middle of it, having found nothing wrong (even in the machine code), I asked them if they were sure that their test procedure was correct, and they said yes, because in another situation the test reported 1 as expected. I told them that there were several variables in the program that had the value 1, at various times, and are they sure the were looking at the right variable? No, as it turned out... > After all I am just a noob. Your code looks pretty good to me, but using fixed-length string types for variable-length data needs some care. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .