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.3 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no 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 01:01:03 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!isdnet!enst!enst.fr!not-for-mail From: Christoph Grein Newsgroups: comp.lang.ada Subject: Re: functions, packages & characters Date: Thu, 21 Feb 2002 09:59:37 +0100 (MET) Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: TEXT/plain; charset=us-ascii X-Trace: avanie.enst.fr 1014282062 14046 137.194.161.2 (21 Feb 2002 09:01:02 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Thu, 21 Feb 2002 09:01:02 +0000 (UTC) Return-Path: Content-MD5: LOxn8liYK3Y/n4kmn63udg== X-Mailer: dtmail 1.2.1 CDE Version 1.2.1 SunOS 5.6 sun4u sparc Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.8 Precedence: bulk X-Reply-To: Christoph Grein List-Help: List-Post: List-Subscribe: , List-Id: comp.lang.ada mail<->news gateway List-Unsubscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:20202 Date: 2002-02-21T09:59:37+01:00 >From the code you provided we can see that you are completely unfamiliar with Ada, this will never compile. This is not an accusation, we all have been beginners some time :-) but please take an intoductory book about Ada (see AdaPower) and work thru it. There are so many problems in the code it's really no use to correct them all. You really have to get a basic understanding of Ada first. Begin with a hello world program: with Ada.Text_IO; procedure Hello is procedure Say_Hello is begin Ada.Text_IO.Put_Line ("Hello Greenhorn :-)"); end Say_Hello; begin Say_Hello; end Hello; > I have been looking at my program and wondered if this woul work > > package obtain is > function Get_Line; <--- return type missing > end obtain; > > with Text_io; > use Text_io; > package body obtain is > begin <--- remove this line (wrong here) > function Get_Line (Text :String) <--- body does not match specification > return Unbounded_String; <--- replace ; by is begin > Get_Line; <--- Parameters missing <--- return stement missing > end; <--- another end statement missing etc.... > > With Text_IO; > use Text_IO; > with obtain > procedure main is > --- > ---pre: tags are in the text > ---post:tags have been correctly reformatted > --- > Text: File; > > function Find_Dblslash (//) > return Single Slash(/)procedure main is > begin > Put_Line ("Please enter text: "); > use obtain;