comp.lang.ada
 help / color / mirror / Atom feed
From: Ole-Hjalmar Kristensen <ohk@clustra.com>
Subject: Re: Natural to String without space? (newbie question)
Date: Fri, 25 May 2001 21:23:47 GMT
Date: 2001-05-25T21:23:47+00:00	[thread overview]
Message-ID: <umqy9rl9l7i.fsf@maestro.clustra.com> (raw)
In-Reply-To: 3b0e0826$1@pull.gecm.com

"Martin Dowie" <martin.dowie@nospam.baesystems.com> writes:

You can even do the same when importing foreign functions, like :


with Interfaces.C_Streams; use Interfaces.C_Streams;

package Uio is 

   type Oflag_T is mod 2**32;
   type Mode_T is mod 2**32;

<snip>

   function Open(Path : chars; Oflag : Oflag_T; Mode : Mode_T := 8#777#) return int;

<snip>

   pragma Import(C,open);
   pragma Import(C,close);
   pragma Import(C,fsync);
   pragma Import(C,read);
   pragma Import(C,write);

end Uio;

> You're welcome, it's a nice little feature, isn't it? I
> was wuick surprised myself the first time I saw it. :-)
> 
> Beard, Frank <beardf@spawar.navy.mil> wrote in message
> news:mailman.990741393.31666.comp.lang.ada@ada.eu.org...
> > Well, you learn something new everyday.  I didn't know you
> > could do a rename and default a parameter when the parent
> > function was not defaulted.
> >
> > Thanks for the info.
> >
> > Frank
> >
> > -----Original Message-----
> > From: Martin Dowie [mailto:martin.dowie@nospam.baesystems.com]
> >
> > or,
> >
> >    function Trim (Value : String;
> >                   Side  : Ada.Strings.Trim_End := Ada.Strings.Both)
> >       return String renames Ada.Strings.Fixed.Trim;
> 
> 
> 

-- 
Kabelsalat ist gesund.

Ole-Hj. Kristensen



  parent reply	other threads:[~2001-05-25 21:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-05-24 21:55 Natural to String without space? (newbie question) Beard, Frank
2001-05-25  7:30 ` Martin Dowie
2001-05-25  8:30   ` Tomas Hlavaty
2001-05-25 15:05   ` Ehud Lamm
2001-05-28  7:31     ` Martin Dowie
2001-05-25 21:23   ` Ole-Hjalmar Kristensen [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-05-23 22:45 Beard, Frank
2001-05-24  7:56 ` Martin Dowie
2001-05-23 15:17 Tomas Hlavaty
2001-05-23 22:37 ` DuckE
2001-05-24  6:33 ` Pascal Obry
2001-05-29 21:04   ` Wes Groleau
2001-05-29 23:00     ` Jeffrey Carter
2001-05-30  7:19     ` Pascal Obry
replies disabled

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