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 autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.66.237.2 with SMTP id uy2mr46340903pac.11.1435875353293; Thu, 02 Jul 2015 15:15:53 -0700 (PDT) X-Received: by 10.140.93.38 with SMTP id c35mr143618qge.38.1435875353235; Thu, 02 Jul 2015 15:15:53 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!news.glorb.com!ff1no1152261igc.0!news-out.google.com!4ni34083qgh.1!nntp.google.com!s91no480531qgd.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 2 Jul 2015 15:15:53 -0700 (PDT) Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=73.138.95.40; posting-account=wEPvUgoAAABrLeiz_LRhQ3jeEhyfWVMH NNTP-Posting-Host: 73.138.95.40 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <764f86ed-3b89-4631-b3f3-4d2b1b8d3df0@googlegroups.com> Subject: How best to test for NULL in Ada? From: NiGHTS Injection-Date: Thu, 02 Jul 2015 22:15:53 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Xref: news.eternal-september.org comp.lang.ada:26569 Date: 2015-07-02T15:15:53-07:00 List-Id: I have encountered several situations where I needed to test an access type= for NULL or not. My instinct is to do something like this: if Some_Object /=3D null then ... But many times I get this error: invalid operand type for operator "/=3D" left operand has type "Some_Object_Type" defined at ... right operand has an access type What is the correct way to test for NULL in Ada? (If you want a specific example, I am trying to test if the Selected Path r= eturned by Gtk.Tree_View.Get_Cursor in the GTK Library is valid or NULL. Bu= t situations like these occur many times in distinct situations so I'm not = looking for a fix to this specific problem) Thank you in advance for your help!