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,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,1edeadc9be5a2350 X-Google-Attributes: gid103376,public From: dewar@merv.cs.nyu.edu (Robert Dewar) Subject: Re: Ada as 2nd Lang, p. 678 Date: 1997/05/02 Message-ID: #1/1 X-Deja-AN: 238908634 References: <5k92el$bs9@ultranews.duc.auburn.edu> Organization: New York University Newsgroups: comp.lang.ada Date: 1997-05-02T00:00:00+00:00 List-Id: John asks about <> The message seems clear enough "file can have only one compilation unit", means that a single file can contain only one compilation unit, and the file you submitted contains two. The Ada standard says nothing about files, or how sources are arranged into files, so this is a place that Ada compilers may differ (some Ada compilers do allow multiple units in a single file). Actually it is generally a bad idea to do what you did -- put the spec and the body in the same unit, because that causes an unnecessary connection between the two. The whole idea in Ada is to separate the spec and the body, so putting them in separate files is recommended in any case. If you are using GNAT, then you can either manually split these into two files, or use gnatchop to do this for you. You really should read the GNAT documentation. This and many other interesting and useful things about GNAT are described there!