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.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b2df4819ac8b566a X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!postnews.google.com!g49g2000cwa.googlegroups.com!not-for-mail From: ich_bin_elvis@hotmail.com Newsgroups: comp.lang.ada Subject: Re: SPARK and Interfaces.C Date: 19 May 2005 03:25:02 -0700 Organization: http://groups.google.com Message-ID: <1116498302.651121.297610@g49g2000cwa.googlegroups.com> References: <1116005688.002279.128010@g43g2000cwa.googlegroups.com> <1116072937.506109.246460@g47g2000cwa.googlegroups.com> <1116327342.680775.205190@o13g2000cwo.googlegroups.com> <1116340818.264418.117280@g14g2000cwa.googlegroups.com> <1116492378.074823.321470@g43g2000cwa.googlegroups.com> <1116493274.004505.67590@g49g2000cwa.googlegroups.com> NNTP-Posting-Host: 158.39.162.180 Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: posting.google.com 1116498307 26829 127.0.0.1 (19 May 2005 10:25:07 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Thu, 19 May 2005 10:25:07 +0000 (UTC) In-Reply-To: <1116493274.004505.67590@g49g2000cwa.googlegroups.com> User-Agent: G2/0.2 Complaints-To: groups-abuse@google.com Injection-Info: g49g2000cwa.googlegroups.com; posting-host=158.39.162.180; posting-account=0aqxew0AAACkVywG-5LBKAoZkI4b4H_t Xref: g2news1.google.com comp.lang.ada:11089 Date: 2005-05-19T03:25:02-07:00 List-Id: Thanks got the sytem shadow to work when i used the hide an, with configuration file i still got an error. 4 type double is new Standard.Long_Float; ^ *** Syntax Error : reserved word "WITH" expected. 6 type int is new Integer; ^ *** Syntax Error : reserved word "WITH" expected. Examining the specification of package Adadll ... The spesification file looks like this package interfaces.C is type double is new Standard.Long_Float; type unsigned_long is mod 2 ** long'Size; type int is new Integer; end interfaces.C; and the Adadll.ads file looks like this, this one gets several errors like this 11 subtype BOOL is Interfaces.C.int; ^ *** Semantic Error :754: The identifier Interfaces is either undeclared or not visible at this point. This package must be both inherited and withed to be visible here. ---- with System; WITH Interfaces.C; --#inherit System,Interfaces.C; package Adadll is ------------------------------ -- Win32 Type Definitions -- ------------------------------ subtype BOOL is Interfaces.C.int; subtype ULONG is Interfaces.C.unsigned_long; subtype LPVOID is System.Address; subtype HINSTANCE is System.Address; -------------------------- -- DLL Initialization -- -------------------------- function DllMain (hInst : HINSTANCE; Reason : ULONG; Reserved : LPVOID) return BOOL; -- DLL management ------------------- -- Subprograms -- ------------------- procedure Check_Buffer(Vrtemp,Vltemp : in out Interfaces.C.Double ); procedure Calcnewposandcourse (T,Vr,Vl,Oldfi, width : in Interfaces.C.Double; X,Y,Fi : in out Interfaces.C.Double ); procedure Stopdrone(vr,vl : in out Interfaces.C.Double); function Angle(X1, Y1, X2, Y2 : in Interfaces.C.Double) return Interfaces.C.Double; function Distance(X1, Y1, X2, Y2 : in Interfaces.C.Double) return Interfaces.C.Double; private ----------------- -- Constants -- ----------------- True_BOOL : constant BOOL := 1; -- win32 BOOL 'True' value DLL_PROCESS_DETACH : constant ULONG := 0; DLL_PROCESS_ATTACH : constant ULONG := 1; -- reasons for calling DllMain --------------------------- -- Export Declarations -- --------------------------- pragma Export (StdCall, DllMain, "DllMain"); --DllMain always uses the StdCall convention --pragma Export(C, Distance, "Distance"); pragma Export (Convention => C, Entity => Distance, External_Name => "Distance"); --pragma Export(C, Angle, "Angle"); pragma Export (Convention => C, Entity => Angle, External_Name => "Angle"); --pragma Export (C, Checkbuffer, "CheckBuffer"); pragma Export (Convention => C, Entity => Check_Buffer, External_Name => "CheckBuffer"); --pragma Export (C, Calcnewposandcourse, "Calcnewposandcourse"); pragma Export (Convention => C, Entity => Calcnewposandcourse, External_Name => "Calcnewposandcourse"); --pragma Export (C, Stopdrone, "Stopdrone"); pragma Export (Convention => C, Entity => Stopdrone, External_Name => "Stopdrone"); --------------------------- -- Import Declarations -- --------------------------- procedure AdaInit; pragma Import (C, AdaInit, "adainit"); -- initialize Ada runtime library procedure AdaFinal; pragma Import (C, AdaFinal, "adafinal"); -- finalize Ada runtime library end Adadll;