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.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,869a3dfe4257254f,start X-Google-Attributes: gid103376,public From: Roga Danar Subject: Constraint Error. Why? Date: 1999/01/12 Message-ID: <369BB766.CB18AAD2@stelnj.nojunk.com>#1/1 X-Deja-AN: 431778148 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Trace: news1.exit109.com 916170891 1596 208.225.73.22 (12 Jan 1999 19:54:50 GMT) Organization: AlphaSoft, Inc. Mime-Version: 1.0 Reply-To: p1@alphasoft-inc.com NNTP-Posting-Date: 12 Jan 1999 19:54:50 GMT Newsgroups: comp.lang.ada Date: 1999-01-12T19:54:50+00:00 List-Id: The following code was compiled with Rational Apex Ada95 on WinNT. Before you ask. Yes, I have run it through the debugger but it has been no help at all. It just tell me: ***************************************** "Handle => Could not find start address of "x25.write_to_port". => Cannot find frame for "x25.write_to_port" on call stack." ******************************************** Okay then. Why am I getting a contraint error when I check for null first? Thanks in advance. Code for the subroutine exactly as it is: function Write_To_Port return Boolean is --Host_Name -- Port_Name : constant String := X25 : constant String := "\\\\GATEWAY_PC_15\\lcp1"; Com2 : constant String := "Com2"; Com3 : constant String := "Com3"; Com4 : constant String := "Com4"; Handle : Windows.Handle := null; Null_Handle : Windows.Pvoid := null; Null_Void : Windows.Void := null; function "=" (L, R : Windows.Pvoid) return Boolean renames Windows."="; function "=" (L, R : Windows.Void) return Boolean renames Windows."="; Status : Boolean := False; begin Win_Show.Display ("Creating the file named: " & Com2); Handle := Winbase.Createfile ( Com2, V_Bits.Bit_Or (Windows.Generic_Read, Windows.Generic_Write), 0, null, Winbase.Open_Existing, Winbase.File_Flag_Overlapped, null); --** Constriant Error on this line ** if Handle /= null and then Handle.all /= null then -- if Handle.all.all /= Winbase.Invalid_Handle_Value then Win_Show.Display ("Created file !!"); Status := True; end if; end if; return Status; exception when E: others => Win_Show.Display (" ** Somethin' BAD happened processing " & Com2 & " ** " & Aen (E)); end Write_To_Port; --