From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org Wed May 27 00:27:07 2015 Return-Path: X-Original-To: sc22wg5-dom8 Delivered-To: sc22wg5-dom8@www.open-std.org Received: by www.open-std.org (Postfix, from userid 521) id AFE953586F7; Wed, 27 May 2015 00:27:07 +0200 (CEST) Delivered-To: sc22wg5@open-std.org Received: from mail-yh0-f53.google.com (mail-yh0-f53.google.com [209.85.213.53]) (using TLSv1 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by www.open-std.org (Postfix) with ESMTP id 3A5A53582F1 for ; Wed, 27 May 2015 00:27:07 +0200 (CEST) Received: by yhda23 with SMTP id a23so34871508yhd.2 for ; Tue, 26 May 2015 15:27:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=J+6B3iMoHV9pILFJD51KQ8Lu/a/3AGbQOp8tSn7RJ5k=; b=WDWFFtkFKCg9ffi9+5f+Em8tS5I+8TQmfbH0wNOmNeo2lNlxorR4XyHCA6iEotdOuG Q9mNAEnR8Tinl1sgXzwwkOrbJBirm4hZTgHxiUk8UXVOXJQs4l9xyg9wYvuIq09moafN b2AMvnHz9bl101k7F/kTYPCT27NsYouVcentzIBJWfNMR3UXqlWV+giHBEmQY9Qs2tTF Jl+wTPZTbn/GDxrQjyonk1AIqody3bpTICFo0zQjinW7K3aVTzGnmrAiBArpuz0xtod1 YPSSlsSu8CAqlg8K2E4DQxkWrdTy0bU/MnjTe8xztB4V5QwAi/M7cmfhLFyj0YljE+ct xyQQ== MIME-Version: 1.0 X-Received: by 10.170.99.135 with SMTP id q129mr29621976yka.2.1432679226266; Tue, 26 May 2015 15:27:06 -0700 (PDT) Received: by 10.129.15.211 with HTTP; Tue, 26 May 2015 15:27:06 -0700 (PDT) Date: Tue, 26 May 2015 15:27:06 -0700 Message-ID: Subject: Assignment to ero-sized strings and arrays From: Walt Brainerd To: fortran standards email list for J3 , "sc22wg5@open-std.org" Content-Type: multipart/alternative; boundary=001a113a791c5bd91c051703a0a6 Sender: owner-sc22wg5@open-std.org Precedence: bulk --001a113a791c5bd91c051703a0a6 Content-Type: text/plain; charset=UTF-8 I am willing to try this one more time. Tell me I am crazy, stupid, or whatever; it has happened before. But to ignore this puzzles me. Is anybody going to correct this error? 7.2.1.3(1) of the F08 standard says: No value is assigned to the variable if it is of type character and zero length, or is an array of size zero. It is still in N2014, if that is the latest. Consider the program: program f character(len=:), allocatable :: c c = "" print *, len(c), "X"//C//"X" c = "QQQ" print *, len(c), "X"//C//"X" end program f The sentence quoted says that the second assignment does not assign the value QQQ because the length of c is zero. I don't think that is what is intended. Just delete the sentence' it was silly, but wasn't wrong in F95. -- Walt Brainerd --001a113a791c5bd91c051703a0a6 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I am willing to try this one more time.

Tell me I am crazy, stupid, or whatever; it has happened before.

<= /div>
But to ignore this puzzles me. Is anybody going to correct this e= rror?

7.2.1.3(1) of the F08 standard says:

No = value is assigned to the variable if it is of type character and zero
=
length, or is an array of size zero.

It is st= ill in N2014, if that is the latest.

Consider the = program:

program f
character(len= =3D:), allocatable :: c
c = =3D ""
print *, = len(c), "X"//C//"X"
c =3D "QQQ"
print *, len(c), "X"//C//"X"
end program f

The sentence quoted says that the second assignment does not
assign the value QQQ because the = length of c is zero. I don't
think that is what is intended.

Just del= ete the sentence' it was silly, but wasn't wrong in F95.

--
Walt Brainerd
--001a113a791c5bd91c051703a0a6--