From: gdotone@gmail.com
Subject: is this a mistake in the book or ...
Date: Wed, 10 Sep 2014 01:26:09 -0700 (PDT)
Date: 2014-09-10T01:26:09-07:00 [thread overview]
Message-ID: <f169bcf2-5558-4e2e-acf5-7bf887a1032c@googlegroups.com> (raw)
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?
next reply other threads:[~2014-09-10 8:26 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-10 8:26 gdotone [this message]
2014-09-10 8:36 ` is this a mistake in the book or anon
2014-09-10 8:53 ` gdotone
2014-09-10 15:02 ` Adam Beneschan
2014-09-10 15:49 ` Pascal Obry
2014-09-11 1:03 ` gdotone
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox