Hi Alan, the way to get the desired bit pattern is (for instance):
integer, parameter :: PL_FCI_MARK = ishft(1,31) It shift the single bit of 1 into the 32nd position leaving a trail of zero bits. (It should even work on ones-complement machines, though I do not think I have ever been close to one and knew about it.) The reason for the failure is that z'80000000' is evaluated as an 8-bytes integer and therefore you get 2147483648 as the value. That does not fit into a 4-bytes integer. Regards, Arjen On 2011-01-27 11:11, Alan W. Irwin wrote: > On 2011-01-27 01:20-0800 Alan W. Irwin wrote: > >> Hi Arjen: >> >> I have the sed script almost working for f95. The only problematic >> statement generated is >> >> integer, parameter :: PL_FCI_MARK = z'80000000' >> >> That z'80000000' causes an integer overflow. The problem is that >> z'80000000' is not a normal 4-byte integer. Assuming twos-complement >> integers, then the negative of that number is also z'80000000'. That >> is, it is a "negative" zero or zero with the sign bit set. Do you know >> how to put that exact pattern of bits into a 4-byte integer in fortran? >> DISCLAIMER: This message is intended exclusively for the addressee(s) and may contain confidential and privileged information. If you are not the intended recipient please notify the sender immediately and destroy this message. Unauthorized use, disclosure or copying of this message is strictly prohibited. The foundation 'Stichting Deltares', which has its seat at Delft, The Netherlands, Commercial Registration Number 41146461, is not liable in any way whatsoever for consequences and/or damages resulting from the improper, incomplete and untimely dispatch, receipt and/or content of this e-mail. ------------------------------------------------------------------------------ Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a world-class log management solution at an even better price-free! Download using promo code Free_Logger_4_Dev2Dev. Offer expires February 28th, so secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsight-sfd2d _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel