On 2009-02-13 09:50-0000 Andrew Ross wrote:

> The real problem is that PLUNICODE was defined as a unsigned 32-bit
> integer. Many languages, including fortran do not have unsigned types,
> and so we only have 31 bits available for the value.

For Fortran, my experience is it is normal to assume arbitrary 32-bit
patterns can be stored in 32-bit integers.  Thus, there is an extra freedom
allowed for that language because there is no distinction between unsigned
and signed integers. I do realize that long experience (I started with
Fortran in 1968) with a language does not necessarily mean wisdom, but if I
am right, the compiler integer overflow error I am getting in the gfortran
case without a special compilation option is really a gfortran
implementation error (a reduction of the freedom that most fortran compilers
will have for this issue).

> It sounds like your approach would work for at least gfortran and
> probably ifort. It is not particularly nice, but neither is the current
> solution. We need to make it clear that fci is only to be thought of as
> a 4 byte bit pattern. We may run into problems with other compilers at
> some stage. We will also need to bodge example 23 to print out the fci
> value correctly.
>
> I'm happy for you to give it a try.

I did so (revision 9523) for the f77 interface.  It works fine for gfortran.
Will everybody (especially Orion) with access to fortran compilers please
give this simplified approach a try?

Note, in the 23rd example I had to work around the gfortran implementation
error by dropping the '8' marker from the hex constants describing the
various fci values.  That was fine for plsfci (which simply puts back the
marker if it does not exist), but I had to explicitly put in the '8' marker
when using the #<0x8nnnnnnn> form of changing the FCI in the middle of
strings. Fortunately, that is going to be a rare case, because I believe
that users will ordinarily use that form explicitly (just type it into the
string) rather than attempting to format it from a predetermined array of
FCI values.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to