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-7-bit X-Google-Thread: 103376,d86a147e5da7c384 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-03-09 11:45:24 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!news.maxwell.syr.edu!lon1-news.nildram.net!peernews!peer.cwci.net!news5-gui.server.ntli.net!ntli.net!news6-win.server.ntlworld.com.POSTED!not-for-mail From: "chris.danx" Newsgroups: comp.lang.ada References: Subject: Re: Some general help with Ada X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 Message-ID: Date: Sat, 9 Mar 2002 19:46:38 -0000 NNTP-Posting-Host: 62.252.144.2 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 1015703120 62.252.144.2 (Sat, 09 Mar 2002 19:45:20 GMT) NNTP-Posting-Date: Sat, 09 Mar 2002 19:45:20 GMT Organization: ntlworld News Service Xref: archiver1.google.com comp.lang.ada:20986 Date: 2002-03-09T19:46:38+00:00 List-Id: "Jim" wrote in message news:ab6237e2.0203091102.103d54e9@posting.google.com... > how do you create a blank screen like the CLS command in Qbasic/DOS ? > > can you do it with text_io ? ada.text_io.new_line (26); is quick and easy. > also how do i remove 'rows' in an array ? eg if an array is made up > of 0..100, i add data into say 1, 2 and 3. How do i then delete 1,2,3 > and be left with 4..100 ? is that possible ? You want to slice the array something like this? WARNING: uncompiled code following type my_array is (natural range <>) of some_type; subtype my_other_array is my_array (range 0..100); function get_relevant_data (a : in my_other_array) return my_array is begin return a(4..a'last); end get_relevant_data; the line return a(4..a'last) will return the elements between 4 and the end of the array (100 in this case). It is important that my_other_array is a subtype of my_array since otherwise they'd be of different types and Ada doesn't allow mixing types in an arbitary fashion. John English covers arrays in his (now online and free) book available at www.it.bton.ac.uk/staff/je/adacraft/ in case your interested. HTH, Chris