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=-0.3 required=5.0 tests=BAYES_00,FREEMAIL_FROM, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,5ed7b28464be2e1a,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.icp.pl!newsfeed.atman.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail From: "maxsio ;D" Newsgroups: comp.lang.ada Subject: Another problems of newbie Date: Thu, 30 Dec 2004 16:31:33 +0100 Organization: Zawodowy obibok Message-ID: Reply-To: maxsio@wp.pl NNTP-Posting-Host: pb160.pabianice.sdi.tpnet.pl Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: atlantis.news.tpi.pl 1104420328 21248 217.99.159.160 (30 Dec 2004 15:25:28 GMT) X-Complaints-To: usenet@tpi.pl NNTP-Posting-Date: Thu, 30 Dec 2004 15:25:28 +0000 (UTC) User-Agent: Mozilla Thunderbird 0.7.2 (Windows/20040707) X-Accept-Language: pl, en-us, en X-City: Pabianice X-Locality: Somewhere in Poland - Pabianice X-Sister: Sprzedam tanio stan prawie idealny doplacam 100 PLN ROTFL13: Dekodowanie jak najbardziej wskazane User-Agent: Maxsio newsreader supported by MicroShit Opsluk 5.5 X-SigInfo: Generated by Sygnaturkowiec v. 0.1.3.6 Xref: g2news1.google.com comp.lang.ada:7323 Date: 2004-12-30T16:31:33+01:00 List-Id: I need to write some program and I have problems with it. This program should read text file, write words to array, sort them and than write to another text file. In one book I found way how to read only singel char so I thought it would be easy to link singel char and rest part of final word, but I was wrong. I've written this subprogram (this program is reading from keyboard, but with files is similar so...) : * procedure chars is word : string(1..31); char : character; begin for i in 1..30 loop Get(char); word:=word&(string(char)); end loop; Put(word); delay 10.0; end chars; * but after first letter program generate constraint error. And second problem which I have is sorting array with words. To sort array I've choosen QuickSort, but I don't know totally how to use it in Ada. I was searching in Google, but I found only QuickSort with pointers. Unfortunately I don't understand how to use them good ind this algorithm. If anybody could explain usage of pointers in this algorithm or write QuickSort without pointers I'd be grateful. Sorry for my poor English and thanks in advance. Greetings maxsio -- maxsio@wp.pl GG: 1447475 IRC: irc.efnet.pl #osiolek