From owner-sc22wg5@open-std.org  Thu Jul 15 07:25:40 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 D1680C3BA04; Thu, 15 Jul 2010 07:25:40 +0200 (CEST)
X-Original-To: sc22wg5@open-std.org
Delivered-To: sc22wg5@open-std.org
Received: from ns.nag-j.co.jp (218-42-159-107.cust.bit-drive.ne.jp [218.42.159.107])
	by www2.open-std.org (Postfix) with ESMTP id 1CEF4C178E4
	for <sc22wg5@open-std.org>; Thu, 15 Jul 2010 07:25:37 +0200 (CEST)
Received: from 218-42-159-108.cust.bit-drive.ne.jp ([218.42.159.108] helo=Marucomputer)
	by ns.nag-j.co.jp with smtp (Exim 4.50)
	id 1OZGw7-0003w5-J8
	for sc22wg5@open-std.org; Thu, 15 Jul 2010 14:24:43 +0900
Message-ID: <9316D3C56DC5428EAD0EA506BCB68156@Marucomputer>
From: "Malcolm Cohen" <malcolm@nag-j.co.jp>
To: "WG5" <sc22wg5@open-std.org>
References: <20100714154320.CE3BBC178DF@www2.open-std.org><4C3DE016.80305@cray.com><20100714160852.14E1BC178DF@www2.open-std.org> <20100714183305.99CE3C178E4@www2.open-std.org>
In-Reply-To: <20100714183305.99CE3C178E4@www2.open-std.org>
Subject: Re: [ukfortran] (SC22WG5.4298) (j3.2006) Fw: a question about ISCONTIGUOUS
Date: Thu, 15 Jul 2010 14:26:43 +0900
Organization: ??NAG
MIME-Version: 1.0
Content-Type: text/plain;
	format=flowed;
	charset="iso-8859-1";
	reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Mailer: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

Dick Hendrickson wrote:
> is_contiguous(array([1]))       true
> is_contiguous(array([1,2,3,4]))     true
> is_contiguous(array([1,3,5,2])    false
>
> The vector valued section checking could be a little slow at run time ;) .

Dick and Jim seem to have missed one of the conditions listed for contiguity of 
an array section, which is
  "(b) it does not have a vector subscript"

Paragraph 3 ("is not contiguous") certainly provides the answer for the third 
one (Jim's example), viz

  "An object is not contiguous if it is an array subobject, and ... the elements 
of the object in array element order are not consecutive in the elements of the 
base object".

As for Dick's extra two examples, they clearly fall into the category of 
paragraph 4:
  "It is processor dependent whether any other object is contiguous."

As for Jim's question
> Should this be an interp?

The answer is no, you should just read the conditions required for contiguity 
which, as the definition of the term "contiguous" says, are "specified in 
5.3.7".

Cheers,
-- 
................................Malcolm Cohen, Nihon NAG, Tokyo. 

