• Aucun résultat trouvé

Superseded features of FORTRAN-PLUS

Dans le document hA pubs\latex\fpe\edl\...) (Page 161-165)

This appendix refers to the superseded features of the FORTRAN-PLUS language which depend on the parallel dimensions of data objects being ‘edge-size’. These superseded features, which are still available for the sake of compatibility with earlier versions of the language, include the concept of treating a matrix as a )ong vector, the former syntax for declaration of parallel data objects, various built-in procedures, host DAP data conversion routines and computational error management facilities.

Constrained parallel data objects can only have ‘edge-size’ parallel dimension(s). Parallel data objects which can have arbitrarily-sized parallel dimension(s) are said to be unconstrained. The superseded features of the language can only work with constrained parallel data objects.

You can work with a mixture of old and new language features the current compilation system will recognise both but you are not recommended to do so.

The edge size of the DAP is referred to in this appendix as ES.

There have also been some changes in terminology:

• The length of a data object is now referred to as its data-length

• In indexing, the terms referencing and naminghave been replaced by selecting and updating respectively (see section 6.3)

The typographical conventions used in this appendix are the same as the conventions used in earlier chapters of this publication.

B.1 Declarations

Previously, for data objects and indexing constructs, parallel dimensions, which occupy just the first (for vectors or vector arrays) or the first and second (for matrices and matrix arrays) subscript

FORTRAN-PLUS enhanced manlO2.Ol 149

positions, were specified with null subscripts, that is, just commas separating the subscript positions where appropriate.

For example:

DIMENSION C( ),D(,) INTEGER A(,) LOGICAL FLAGS() REAL X( ,4),Y(,,7)

would have declared in a DAP 500 program:

1. A 32 component real vector C and a 32 x 32 real matrix D 2. A 32 x 32 integer matrix A

3. A 32 component logical vector FLAGS

4. An array X of 4 vectors, each with 32 components and an array Y of 7 matrices, each 32 x 32 in size

B.2 Long vectors

A long vector is an ES x ES matrix viewed with its components arranged in a one-dimensional set in column-major order. Various built-in procedures and indexing operations, in particular some of the shift operations, treated ES x ES matrices as long vectors.

B.3 Built-in procedures

Some in procedures, listed in section B,3.1, have been entirely supplanted by new built-in procedures for unconstrabuilt-ined data objects; other built-built-in procedures have a revised syntax for operations with unconstrained objects. These latter procedures and their former syntax are listed in section B.3.2. Built-in procedures which are the shift functions which formerly treated a constrained matrix argument as a long vector are listed in section B.3.3.

B.3.1 Supplanted procedures

• ELL(i) where:

i is a 4 byte integer scalar

The ELL function returns a logical ES x ES matrix whose i component (viewed in a long vector order) is .TRUE.; all other components are .FALSE.. If I is not in the range 1 to ES, all components of the result are .FALSE.

S

150 manlO2.O1 AMT

B.3. Built-in procedures 151

• ELSL(i,j) where:

i and

j

are 4 byte integers

The ELSL function returns a logical ES x ES matrix. Components of the result matrix (viewed in long vector order) in the range i to

j

are set .TRUE.; all other components are .FALSE.. If either i or

j

are not in the range 1 to ES2 or i is greater than

j,

then all components of the result matrix are .FALSE.

• CALL SHORT.INDEX(v) where:

v is a 4-byte integer vector with ES components

On return from the SHORT_ INDEX subroutine, the component of v contains the value I where i is in the range 1 to ES inclusive; that is, v contains the numbers 1, 2, 3 ES.

• CALL LONGINDEX(m) where:

m is a 4-byte integer matrix of shape ES x ES

On return from the LONG_INDEX subroutine, the th component of m, where mis viewed in long vector order, contains value i where i is in the range 1 to ES3 inclusive; that is, m contains the numbers 1, 2, 3 ES3

B.3.2 Functions returning constrained arguments

Some functions which return matrix or vector results were used in previous versions of FORTRAN-PLUS with fewer arguments: since the results had to be of constrained size, the arguments giving the number of rows or number of columns or both were not necessary. These functions are:

ALT (I)

FORTRAN-FL US enhanced man 102.01 151

The types, data-lengths and values of the arguments are as described for the corTesponding argu ments in the descriptions of the current forms of the procedures in chapter 11 (adjust any arbitrary sizes of parallel dimensions to ES where necessary).

B.3.3 Operating on long vectors

Some existing functions which operate on vectors can also take constrained matrix arguments the matrix is then regarded as a long vector.

The functions are:

REV(m) SHLC(m [,i]) SHLP(m [,i]) SHRC(m

[,iJ)

SHRP(m

{,iJ)

where:

• m is a constrained matrix

• us a 4 byte integer scalar

Also a constrained matrix variable or expression can be indexed by a single + or as described in section 7.2.1. The matrix is then treated as a long vector.

B.4 Computational error management

This section contains a list of the computational error management functions which are now su perseded. Each function takes a single argument whose mode determines the middle letters of the function name. Each function either NOMinates an Error MaSK, or NOMinates an Error RePorTing variable, or ReSTores an Error MasK or RePorTing variable for the mode of the argument.

The functions are:

N OMMAT...EMSK N OM...MAT..ERPT NOM...SCA..EMSK NOM...SCA....ERPT NOM..VEC.EMSK NOM...VEC..ERPT RST...MAT...EMSK RSTJb4ATERPT RST...SCA..EMSK RST.SCA..ERPT RST...VEC..EM SK RST.VEC...ERPT

152 manlO2.O1 AMT

3.5, Conversion routines 153

Dans le document hA pubs\latex\fpe\edl\...) (Page 161-165)