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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,794c64d1f9164710 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-02-21 14:48:35 PST Path: archiver1.google.com!postnews1.google.com!not-for-mail From: unversedangel@aol.com Newsgroups: comp.lang.ada Subject: Re: functions, packages & characters Date: 21 Feb 2002 14:48:34 -0800 Organization: http://groups.google.com/ Message-ID: References: <20020221130715.12738.00000034@mb-bg.aol.com> NNTP-Posting-Host: 64.12.104.181 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit X-Trace: posting.google.com 1014331715 6086 127.0.0.1 (21 Feb 2002 22:48:35 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: 21 Feb 2002 22:48:35 GMT Xref: archiver1.google.com comp.lang.ada:20229 Date: 2002-02-21T22:48:35+00:00 List-Id: unversedangel@aol.com (Unversed Angel) wrote in message news:<20020221130715.12738.00000034@mb-bg.aol.com>... i thought of an unbounded string but the program will not go through the compiler, no matter which one i use or how i change the program. with Text_io; use Text_io; procedure main is ---pre: text is in the mark up language ---post: text has been converted to english ---test: once thru procedure Get_line is ---pre:text needs to be input ---post:text has been input ---test: once thru Line_Buffer : String(Unbounded_String); Line_Length : Natural range 0 .. Line_Buffer'Last; Line_Store : array (1 .. 10_000) of Unbounded_String; Line_Count : Natural range 0 .. Line_Store'Last; begin loop Get_Line (Line_Buffer, Line_Length); Line_Count := Line_Count + 1; Line_Store (Line_Count) := To_Unbounded_String (Line_Buffer (1 .. Line_Length)); new_line; end loop; end; Procedure doubleslash is ---pre:mark up language has been input ---post:doubleslash has been converted to single slash ---test: /,//,/// begin Loop For i in s'range loop if s(i)="//" then s:='/'; end if; end loop; end; procedure unformatted is ---pre: mark up language has been input ---post:/N tag has left the text formatted as it was ---test: /N, /N/N,/N/U Loop For i in s'range loop if s(i)=/N then do nothing elseif exit end if; end if; end_loop; End; Begin --of main s:string; Put("Please enter text: "); Get_Line(s); doubleslash; unformatted; end; -------------------Target: Win32 (Intel) Debug-------------------- main.adb: Error: line 11 col 23 LRM:4.1(3), Direct name, Unbounded_String, is not visible, Ignoring future references main.adb: Error: line 11 col 40 LRM:3.3.1(5), an object declaration with an indefinite subtype must have an initialization expression, continuing main.adb: Error: line 20 col 7 LRM:4.1(3), Direct name, To_Unbounded_String, is not visible, Ignoring future references main.adb: Error: line 31 col 12 LRM:4.1(3), Direct name, s, is not visible, Ignoring future references main.adb: Error: line 36 col 1 Parse error: expected END_LOOP, got END, Skipping up to semicolon main.adb: Error: line 38 col 1 LRM:5.1(2), Parse error expecting statement got PROCEDURE, skipping to after next semicolon main.adb: Error: line 48 col 5 Parse error: expected END, got END_IF, Inserting END main.adb: Error: line 48 col 5 Parse error: expected SEMICOLON, got END_IF, Inserting SEMICOLON main.adb: Error: line 48 col 5 LRM:3.1(3), Parse error expecting declaration got END_IF, Skipping to after next semicolon main.adb: Error: line 49 col 11 Parse error: expected COLON, got SEMICOLON, Inserting COLON main.adb: Error: line 49 col 11 LRM:4.1(2), Syntax error: the token SEMICOLON can not be used as a name, skipping to next separator main.adb: Error: line 50 col 1 Parse error: expected BEGIN, got END, Inserting BEGIN main.adb: Error: line 50 col 1 LRM:5.1(2), Unexpected ending token END where statement is required, continuing main.adb: Error: line 52 col 1 LRM:10.1.1(5), BEGIN is unexpected here, Continuing main.adb: Error: line 53 col 6 LRM:10.1.1(5), Identifier is unexpected here, Continuing main.adb: Error: line 53 col 7 LRM:10.1.1(5), COLON is unexpected here, Continuing main.adb: Error: line 53 col 8 LRM:10.1.1(5), Identifier is unexpected here, Continuing main.adb: Error: line 53 col 14 LRM:10.1.1(5), SEMICOLON is unexpected here, Continuing main.adb: Error: line 54 col 1 LRM:10.1.1(5), Identifier is unexpected here, Continuing main.adb: Error: line 54 col 4 LRM:10.1.1(5), LEFT PARENTHESIS is unexpected here, Continuing main.adb: Error: line 54 col 5 LRM:10.1.1(5), Character String is unexpected here, Continuing main.adb: Error: line 54 col 26 LRM:10.1.1(5), RIGHT PARENTHESIS is unexpected here, Continuing main.adb: Error: line 54 col 27 LRM:10.1.1(5), SEMICOLON is unexpected here, Continuing main.adb: Error: line 55 col 1 LRM:10.1.1(5), Identifier is unexpected here, Continuing main.adb: Error: line 55 col 9 LRM:10.1.1(5), LEFT PARENTHESIS is unexpected here, Continuing main.adb: Error: line 55 col 10 LRM:10.1.1(5), Identifier is unexpected here, Continuing main.adb: Error: line 55 col 11 LRM:10.1.1(5), RIGHT PARENTHESIS is unexpected here, Continuing main.adb: Error: line 55 col 12 LRM:10.1.1(5), SEMICOLON is unexpected here, Continuing main.adb: Error: line 56 col 1 LRM:10.1.1(5), Identifier is unexpected here, Continuing main.adb: Error: line 56 col 12 LRM:10.1.1(5), SEMICOLON is unexpected here, Continuing main.adb: Error: line 57 col 1 LRM:10.1.1(5), Identifier is unexpected here, Continuing main.adb: Error: line 57 col 12 LRM:10.1.1(5), SEMICOLON is unexpected here, Continuing main.adb: Error: line 58 col 1 LRM:10.1.1(5), END is unexpected here, Continuing main.adb: Error: line 58 col 4 LRM:10.1.1(5), SEMICOLON is unexpected here, Continuing Front end of ..\..\..\..\my documents\cs131\main.adb failed with 34 errors. (0 Warnings) Tool execution failed.