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,7911c453055ce33b,start X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2004-01-08 12:33:14 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: mmq_2002@onetel.net.uk (Qas) Newsgroups: comp.lang.ada Subject: weird compilation error... Date: 8 Jan 2004 12:33:14 -0800 Organization: http://groups.google.com Message-ID: NNTP-Posting-Host: 213.78.126.179 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1073593994 26132 127.0.0.1 (8 Jan 2004 20:33:14 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 8 Jan 2004 20:33:14 +0000 (UTC) Xref: archiver1.google.com comp.lang.ada:4225 Date: 2004-01-08T12:33:14-08:00 List-Id: hello all, (pascal) me again.bdw it wasn't hmwk last time just an excercise the tutor hadnt talked about and wanted us to give a try in spare time.! any how, i have this program and i want to enter the string i read using get_line into an array. this how the program looks like(so far): ------------------------------------- PROCEDURE Search1 IS --subtype filename is string(1..3500); -- File:Filename; Max_Chars:Integer:=37; Current_Line:String(1..Max_Chars); SUBTYPE Stringy IS String (1..37); TYPE Key_Array IS ARRAY (1 .. 101) OF stringy; Files:Key_Array; Line:Natural; Count:Integer:=0; Blank:CONSTANT Character:=' '; Words:Integer:=0; BEGIN Openinput(Filename=>"filelist.txt"); --openoutput(filename=>"result.txt"); WHILE NOT End_Of_File LOOP Get_Line(Item=>Current_Line, Last=>Line); --| i want to enter this line into 1 element of the above array.how? Put_Line(Item=>Current_Line(1..Line)); files:=current_line; --| here the compilation error occurs Count:=Count+1; END LOOP; new_line;Put("COUNT ");Put(Count); Closeinput; --closeoutput; END Search1; ------------------------------------------- now the compilation error is this: search1.adb:33:14: expected type "Key_Array" defined at line 16 search1.adb:33:14: found type "Standard.String" now what does it mean by expected Key_array because as far as i can understand the key_array is a string array. or are string arrays not possible? if theyre not then will a record work? so any other way of doing this this is the format of the input file: xxxxxxxyyyyyy EOL sssssskkkkkkkdddddsss EOL fffffffdddddd EOL ffffffffffffffff EOL each line is max 36 char but can be less thanks for reading. Qas