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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,T_HK_NAME_FM_MR_MRS autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d253eb7042ff641,start X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!postnews.google.com!s15g2000yqs.googlegroups.com!not-for-mail From: "Mr.Spark" Newsgroups: comp.lang.ada Subject: a slight problem need some help. Simulation Control System Date: Fri, 13 Nov 2009 08:09:01 -0800 (PST) Organization: http://groups.google.com Message-ID: <1ca4f848-7e5e-4524-8df3-43ea76caafbc@s15g2000yqs.googlegroups.com> NNTP-Posting-Host: 128.240.229.65 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1258128541 32523 127.0.0.1 (13 Nov 2009 16:09:01 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 13 Nov 2009 16:09:01 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: s15g2000yqs.googlegroups.com; posting-host=128.240.229.65; posting-account=9cnuMgoAAACVm1EM80Y3k6mYMNXtvlB3 User-Agent: G2/1.0 X-HTTP-Via: 1.1 bucket6.ncl.ac.uk:8080 (squid/2.6.STABLE13) X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; .NET CLR 3.0.30729; InfoPath.2; .NET CLR 3.5.30729),gzip(gfe),gzip(gfe) Xref: g2news1.google.com comp.lang.ada:8085 Date: 2009-11-13T08:09:01-08:00 List-Id: I had a problem when I run examiner to check if the body package is working fine but the problem it gives me: Specification Part: with Sensor, Pump; --# inherit Sensor, Pump; package Tank --# own Tank_Level; --# initializes Tank_Level; is procedure Control; --# global out Tank_Level; --# in Sensor.Level; --# in out Pump.Pump_Open; --# derives Tank_Level from Sensor.Level & --# Pump.Pump_Open from Sensor.Level, Pump.Pump_Open; end Tank; Body Package Is : with Sensor, Pump; package body Tank is Empty: constant Sensor.Level_Type := 10; Full: constant Sensor.Level_Type := 60; -- this procedure controls the operation of pumps when they should be opened -- or closed for the safety of the system. The pump will be closed if the -- Water Level Tank is <= 10 and it will be Opened if the Water Level -- in Tank >= 60. procedure Control is Tank_Level: Sensor.Level_Type; begin Tank_Level:= Sensor.Get_Level; if Tank_Level <= Empty then Pump.Close; elsif Tank_Level >= Full then Pump.Open; end if; end Control; end Tank; The errors that it shows are : 1.Semantic Error : Ilegal redeclaration of identifier Tank_Level; 2.Semantic Error : The Identifier is either undeclared or not visible at his point 3.Semantic Error : The Identifier is either undeclared or not visible at his point1. 4.Semantic Error : The Identifier is either undeclared or not visible at his point 5.Semantic Error : The own variable Tank_Level does not have a definition If you could give me a hint how to solve this problem it would be great.