Re: [Plplot-devel] logical variables in f95 interface

On Tue, Dec 06, 2005 at 01:38:13PM +0100, Arjen Markus wrote:
> Andrew Ross wrote:
> >
> > Agreed. This is definitely the first step before we worry about
> > bindings.
> >
>
> I just committed a new version of plplot.h:
> - about 11 functions use logical arguments
> - two functions use arguments that are used as a set of individual bits
> (I have introduced the type "PLFLAGS" for them.
>
> A large fraction of them may not be commonly used, but the set does
> include
> such functions as plscmap1l() for setting the colours in colour map 1.
>
> I may have missed one or two or misinterpreted them, but I think this
> is the extent of the problem.
>
> The PLFLAGS type could be implemented in Fortran 95 as either individual
> logical arguments or as a set of parameters/named constants. That is
> something to worry about later.
Thanks for this Arjen.
I've altered the C++ bindings and examples to use the bool type for
these PLBOOL cases. There are also overloaded version which use the old
PLINT argument for backwards compatibility.
I will look at java when I have chance.
I'm not so sure about splitting up these PLFLAGS cases. This method is
commonly used for passing flags. For a case with several flags it could
easily lead to a bloating of the number of arguments if we have a
separate argument for each. It could also end up taking a lot more
storage. I think most systems actually use at least a byte internally
for logical variables.
Cheers
Andrew

Community

Help

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

I agree to receive quotes, newsletters and other information from sourceforge.net and its partners regarding IT services and products. I understand that I can withdraw my consent at any time. Please refer to our Privacy Policy or Contact Us for more details