From owner-sc22wg5@open-std.org  Tue Mar  2 09:25:59 2010
Return-Path: <owner-sc22wg5@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www2.open-std.org
Received: by www2.open-std.org (Postfix, from userid 521)
	id C2F69C3BA12; Tue,  2 Mar 2010 09:25:59 +0100 (CET)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from ppsw-6.csi.cam.ac.uk (ppsw-6.csi.cam.ac.uk [131.111.8.136])
	by www2.open-std.org (Postfix) with ESMTP id 14A2FC178E5
	for <sc22wg5@open-std.org>; Tue,  2 Mar 2010 09:25:58 +0100 (CET)
X-Cam-AntiVirus: no malware found
X-Cam-SpamDetails: not scanned
X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/
Received: from hermes-2.csi.cam.ac.uk ([131.111.8.54]:38479)
	by ppsw-6.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:25)
	with esmtpa (EXTERNAL:nmm1) id 1NmNQU-0003JZ-Jt (Exim 4.70)
	(return-path <nmm1@hermes.cam.ac.uk>); Tue, 02 Mar 2010 08:25:58 +0000
Received: from prayer by hermes-2.csi.cam.ac.uk (hermes.cam.ac.uk)
	with local (PRAYER:nmm1) id 1NmNQU-0003cY-4t (Exim 4.67)
	(return-path <nmm1@hermes.cam.ac.uk>); Tue, 02 Mar 2010 08:25:58 +0000
Received: from [83.67.89.123] by webmail.hermes.cam.ac.uk
	with HTTP (Prayer-1.3.2); 02 Mar 2010 08:25:58 +0000
Date: 02 Mar 2010 08:25:58 +0000
From: "N.M. Maclaren" <nmm1@cam.ac.uk>
To: "sc22wg5@open-std.org" <sc22wg5@open-std.org>
Subject: Re: [ukfortran] (SC22WG5.4203) (j3.2006) RE:  43 Fortran compilers
Message-ID: <Prayer.1.3.2.1003020825580.1538@hermes-2.csi.cam.ac.uk>
In-Reply-To: <20100301230324.6ED33C178DF@www2.open-std.org>
References: <20100301174456.8A65CC178D9@www2.open-std.org>
 <20100301181556.45D4FC178D9@www2.open-std.org>
 <20100301230324.6ED33C178DF@www2.open-std.org>
X-Mailer: Prayer v1.3.2
Mime-Version: 1.0
Content-Type: text/plain; format=flowed; charset=ISO-8859-1
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

On Mar 1 2010, Bill Long wrote:
>
>Indeed, M77.  I looked at the manual and found that, in 1980, M77 had 
>the radical extension of A .op. B where op was and, or, xor, ... and A 
>and B were numeric type variables, with the operations bitwise.  Only 30 
>years ago.  Maybe this idea needs a bit more time to mature. :)

Or rot down?

It was a major nightmare - and I don't mean just for portability.
Even with a single compiler for a single architecture, bit-flipping
on REAL and the sign bit of integers is beyond the ability of almost
all programmers.  If I recall, those machines weren't twos complement,
either, but I didn't use them directly.

Restricting it to non-negative integers has worked in many languages,
but with the ongoing problem of priority.  A == B.OR.C has been a major
gotcha in every language that I know of that has allowed it.  Even using
two operators for the two priorities (and, to some extent, functionality)
helps only a little.

And, yes, I do mean that porting CDC Fortran wasn't JUST a matter of
changing its syntax - it was amazing how often one discovered that the
original programmer had made an error with bit twiddling due to the
above gotchas.

Regards,
Nick Maclaren.


