comp.lang.ada
 help / color / mirror / Atom feed
From: Maciej Sobczak <see.my.homepage@gmail.com>
Subject: Re: "NULL" returned by a function
Date: Sat, 9 Aug 2014 09:15:20 -0700 (PDT)
Date: 2014-08-09T09:15:20-07:00	[thread overview]
Message-ID: <672dc0dd-5005-44ef-bfa2-69f305ecc483@googlegroups.com> (raw)
In-Reply-To: <ls3ec1$v3q$1@speranza.aioe.org>

On Friday, August 8, 2014 11:10:28 PM UTC+2, Victor Porton wrote:

> What if I want to make a function which returns either a value of type T or 
> a value signifying "nothing" (like null pointer)?

The Ada.Containers.Indefinite_Holders package can be used to create a return type for such a function.

-- 
Maciej Sobczak * http://www.msobczak.com * http://www.inspirel.com


      parent reply	other threads:[~2014-08-09 16:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-08 21:10 "NULL" returned by a function Victor Porton
2014-08-08 21:19 ` Jeffrey Carter
2014-08-08 22:04   ` Victor Porton
2014-08-08 22:50     ` Jeffrey Carter
2014-08-09 12:45   ` Victor Porton
2014-08-09 15:13     ` Jeffrey Carter
2014-08-08 21:25 ` Shark8
2014-08-09 16:15 ` Maciej Sobczak [this message]
replies disabled

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