comp.lang.ada
 help / color / mirror / Atom feed
From: Poul-Erik Andreasen <poulerik@pea.dk>
Subject: Re: binding to C: popen
Date: Tue, 21 Feb 2006 17:16:11 +0100
Date: 2006-02-21T17:16:11+01:00	[thread overview]
Message-ID: <43fb3ccb$0$169$edfadb0f@dread11.news.tele.dk> (raw)
In-Reply-To: <43fb374a$0$13593$9b4e6d93@newsread2.arcor-online.net>

Georg Bauhaus wrote:
> Poul-Erik Andreasen wrote:
> 
> 
>>Yes but a C pointer is in Ada represented as system.address and i can
>>not test that for O the the systems.address_image gives 0804C060 and if
>>that is a stadart c value for a null-pointer things are fine, but that
>>seems to be a hack.
> 
> 
> System.Null_Address, or Interfaces.C.Strings.Null_Ptr perhaps?
> 
> You could consider writing a predicate like
> 
>   fucntion is_null(p: System.Address) return Boolean;
> 
> in order to have the comparison in one place only.
> 
> HTH,
>  Georg 
In the meantime i have found out that i will not help much. The 
null-pointer return will only occur if there is a internal error, and 
since  sh normaly will succed even if the command fails it somthing that
rarely occurs. I can not even find out a way to test it.

Poul-Erik



  reply	other threads:[~2006-02-21 16:16 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-21 14:37 binding to C: popen Poul-Erik Andreasen
2006-02-21 15:25 ` jimmaureenrogers
2006-02-21 15:45   ` Poul-Erik Andreasen
2006-02-21 15:52     ` Georg Bauhaus
2006-02-21 16:16       ` Poul-Erik Andreasen [this message]
2006-02-21 16:12     ` Alex R. Mosteo
2006-02-21 23:51     ` Jeffrey R. Carter
2006-02-22 13:50 ` Marc A. Criley
2006-02-23  1:10   ` poulerik
replies disabled

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