comp.lang.ada
 help / color / mirror / Atom feed
From: "Dmitry A. Kazakov" <mailbox@dmitry-kazakov.de>
Subject: Re: How best to test for NULL in Ada?
Date: Fri, 3 Jul 2015 09:30:00 +0200
Date: 2015-07-03T09:30:00+02:00	[thread overview]
Message-ID: <15ijitqkqlg8h.17vgpafqq0fg4$.dlg@40tude.net> (raw)
In-Reply-To: mn4gr7$97r$2@dont-email.me

On Thu, 02 Jul 2015 16:19:22 -0700, Jeffrey R. Carter wrote:

> The path returned has type Gtk.Tree_Model.Gtk_Tree_Path, which is a tagged
> record type. Since it's not an access type, you can't compare it to null. You
> have to compare it to a value of type Gtk.Tree_Model.Gtk_Tree_Path.

Yes. There is the Null_Gtk_Tree_Path constant for that.

Gtk_Tree_Path is a wrapped pointer. One thing Ada should have is the
abstract access type to have such wrappers derived from, and thus making
comparison to null legal (instead of the implicit dereference hack).

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de


  parent reply	other threads:[~2015-07-03  7:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-02 22:15 How best to test for NULL in Ada? NiGHTS
2015-07-02 23:19 ` Jeffrey R. Carter
2015-07-03  0:12   ` Randy Brukardt
2015-07-04  2:02     ` Shark8
2015-07-03  7:30   ` Dmitry A. Kazakov [this message]
2015-07-05 23:32 ` NiGHTS
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox