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 Path: border2.nntp.dca1.giganews.com!nntp.giganews.com!newspeer1.nac.net!newsfeed.xs4all.nl!newsfeed4a.news.xs4all.nl!xs4all!news.stack.nl!aioe.org!.POSTED!not-for-mail From: anon@att.net Newsgroups: comp.lang.ada Subject: Re: is this a mistake in the book or ... Date: Wed, 10 Sep 2014 08:36:01 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: Reply-To: anon@att.net NNTP-Posting-Host: QxvgQtBa9FsC8ERJsVy+JA.user.speranza.aioe.org X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: IBM NewsReader/2 2.0 Xref: number.nntp.dca.giganews.com comp.lang.ada:188938 Date: 2014-09-10T08:36:01+00:00 List-Id: Since your using GNAT compiler Specification files must have extension ".ads" while the body is extension ".adb" In , gdotone@gmail.com writes: >The following coming from Ada 95 Problem Solving and Program >Design p.121 > >Program 3.8 Specification for Screen Package >---------------------------------------------------------------------- > >Package Screen is >---------------------------------------------------------------------- >-- | Procedure for drawing pictures on ANSI Terminal Screen >-- | Author: Michael B. Feldman, The George Washington University >-- | Last Modified: July 1995 >---------------------------------------------------------------------- > > -- constants: the number of rows and columns on the terminal > > Screen_Depth : constant Integer := 24; > Screen_Width : constant Integer := 80; > > -- subtypes giving the ranges of acceptable inputs > -- to the cursor-positioning operation > > subtype Depth is Integer range 1..Screen_Depth; > subtype Width is Integer range 1..Screen_Width; > > procedure Beep; > -- Pre: None; > -- Post: Terminal makes its beep sound once > > procedure ClearScreen; > -- Pre: None > -- Post: Terminal Screen is cleared > > procedure MoveCursor (Column : Width; Row : Depth); > -- Pre: Column and Row have been assigned in-range value > -- Post: Cursor is moved to the given spot on the screen > >End Screen; > >when i compile this using gnatmake -gnatl Screen.adb > >i get an error message: >>> keyword "Body" expected here [see file name] >and a pointer to the location right after Package and before Screen > >are package specification able to be compiled without the body? >and or how do i compile this? > >in program 3.9 p 122 Body of Screen Package >i do see > >PACKAGE BODY Screen is ... > >so do they need to be compiled together? >if so, how do i do that?