From: Victor Porton <porton@narod.ru>
Subject: Logical constants
Date: Fri, 29 Sep 2017 21:12:50 +0300
Date: 2017-09-29T21:12:50+03:00 [thread overview]
Message-ID: <oqm2f1$1sdc$1@gioia.aioe.org> (raw)
I pass a private type T (whose full type is a record) containing a Handle to
a subprogram.
(In fact, a handle is a pointer to a C struct.)
All such subprograms can be written as subprograms with "in" mode for T,
because they do not modify the handle.
But some of these programs logically modify the corresponding C object
(without modifying the handle itself, they may modify the struct the handle
points to).
Should I pass T arguments to such subprograms in "in out" mode? To use "in"
only is allowed by the language rules, but logically them are "in out".
What are the arguments for using either "in" or "in out" in this case?
--
Victor Porton - http://portonvictor.org
next reply other threads:[~2017-09-29 18:12 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-29 18:12 Victor Porton [this message]
2017-09-29 20:50 ` Logical constants Dmitry A. Kazakov
2017-10-02 19:07 ` Victor Porton
2017-10-02 19:26 ` Dmitry A. Kazakov
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox