From j.l.schonfelder@liverpool.ac.uk  Mon Aug 10 16:32:52 1998
Received: from ratatosk.DK.net (root@[193.88.44.22]) by dkuug.dk (8.6.12/8.6.12) with ESMTP id QAA00315 for <SC22WG5@dkuug.dk>; Mon, 10 Aug 1998 16:32:51 +0200
Received: from pcmail.liv.ac.uk (exim@pcmail.liv.ac.uk [138.253.252.13]) by ratatosk.DK.net (8.8.8/8.8.8) with SMTP id NAA26611 for <SC22WG5@dkuug.dk>; Mon, 10 Aug 1998 13:19:36 +0200 (MET DST)
Received: from jlspcnt.liv.ac.uk [138.253.102.118] 
	by pcmail.liv.ac.uk with smtp (Exim 1.73 #2)
	id 0z5pzA-0001vR-00; Mon, 10 Aug 1998 12:19:32 +0100
From: Lawrie Schonfelder <j.l.schonfelder@liverpool.ac.uk>
Reply-To: j.l.schonfelder@liverpool.ac.uk
To: SC22/WG5 members <SC22WG5@dkuug.dk>
Subject: String standard, module and F95
Message-ID: <SIMEON.9808101233.B@jlspcnt.liverpool.ac.uk>
Date: Mon, 10 Aug 1998 12:19:33 +0100 (British Summer Time)
Priority: NORMAL
X-Mailer: Simeon for Win32 Version 4.1.5 Build (43)
X-Authentication: IMSP
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

I was doing some programming over the weekend to try and implement the 
decision by WG5 that the SPLIT subroutine should be elemental. Much to my 
surprise and considerable chagrin I discovered that I could not make the 
procedures elemental since they needed to use in internal working string 
whose length was declared depending on the SIZE of a dummy argument. For some 
entirely unfathomable reason this is barred by the standard. At that point I 
all but gave up on Fortran and decided to through in my lot with Java.
Why oh why must Fortran continue to be lttered with these arbitrary, IMO, 
unjustified restrictions. This one makes just about any data-abstraction 
based on dynamic types or even those that need automatic local work arrays 
impossible to extend elementally.
The standard justifies this (adjective deleted) restriction on the grounds of 
optimisation. What optimisation?  This smacks to me of an excuse for sloppy 
compilation. 
If I need this sort of functionality the code I would have to produce to work 
around this problem would be vastly less efficient in my time and I suspect 
also in machine time. If I dont need this functionality and dont use it I 
would expect a half way decent optimising compiler to be able to detect that 
and apply what ever optimisation was being protected.
I despair! When will WG5 learn that petty restrictions like this are killing 
Fortran if they have not already done so.
It just so happens that the compiler I am using to test the string module 
does the sensible thing and allows terms like SIZE(dummy_arg) in spec-expr in 
elemental procedures as an obvious extension. It still makes it difficult for 
the SPLIT routine to be made elemental in the standard though.

--
Lawrie Schonfelder
Director, Computing Services Dept.
The University of Liverpool, UK, L69 7ZF
Phone: 44(151)794 3716, Fax: 44(151)794 3759




