From: "Pascal Obry" <p.obry@der.edf.fr>
Subject: Re: "out" or "access"
Date: 1998/10/22
Date: 1998-10-22T00:00:00+00:00 [thread overview]
Message-ID: <70mo3h$gll$1@cf01.edf.fr> (raw)
In-Reply-To: F16K5L.F2B.0.-s@inmet.camb.inmet.com
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 934 bytes --]
Tucker Taft a �crit dans le message ...
>=:-) Vincent (vb@bruker.fr) wrote:
>: What's the best way ?
>
>An "out" parameter is always preferable to an "access" parameter, in my
view.
>
>Use an "access" parameter only if you need an access value when
>inside the called subprogram for some reason. This usually only
>happens when interfacing to some other language, or some preexisting
>subsystem of some sort.
>
Ok but be carefull. With an access type you can't pass a null pointer. This
is a big problem.
In fact if you look at the Win32 C API or UNIX C library you'll find that it
is often possible
to pass a null pointer to some parameters to say : "ignore this one, I don't
care for the result" !
So, in many many cases it is better to use an access type (not an access
formal parameter)
when interfacing with some other language.
Pascal.
PS : The Win32Ada binding is full of access parameters that are just wrong !
next prev parent reply other threads:[~1998-10-22 0:00 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-10-21 0:00 "out" or "access" =:-) Vincent
1998-10-21 0:00 ` dennison
1998-10-21 0:00 ` Tucker Taft
1998-10-22 0:00 ` Pascal Obry [this message]
1998-10-29 0:00 ` Robert A Duff
1998-10-29 0:00 ` Matthew Heaney
1998-10-29 0:00 ` Robert A Duff
1998-10-30 0:00 ` dennison
1998-10-30 0:00 ` Matthew Heaney
1998-10-30 0:00 ` Robert A Duff
1998-10-31 0:00 ` Matthew Heaney
1998-11-01 0:00 ` Robert A Duff
1998-11-01 0:00 ` Matthew Heaney
1998-11-01 0:00 ` Robert A Duff
1998-11-02 0:00 ` Matthew Heaney
1998-11-03 0:00 ` Simon Wright
1998-11-16 0:00 ` Matthew Heaney
1998-10-31 0:00 ` dewar
1998-10-31 0:00 ` Matthew Heaney
1998-10-21 0:00 ` Jeff Carter
1998-10-21 0:00 ` Pat Rogers
1998-10-21 0:00 ` Martin C. Carlisle
1998-10-22 0:00 ` Pat Rogers
1998-10-22 0:00 ` Robert A Duff
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox