1、Information technology Prog ramming languages Fortran Part1:Base languageCAN/CSA-ISO/IEC 1539-1:12(ISO/IEC 1539-1:2010, IDT)National Standard of CanadaNOT FOR RESALE.PUBLICATION NON DESTINE LA REVENTE.Legal Notice for StandardsCanadian Standards Association (CSA) standards are developed through a co
2、nsensus standards development process approved by the Standards Council of Canada. This process brings together volunteers representing varied viewpoints and interests to achieve consensus and develop a standard. Although CSA administers the process and establishes rules to promote fairness in achie
3、ving consensus, it does not independently test, evaluate, or verify the content of standards.Disclaimer and exclusion of liabilityThis document is provided without any representations, warranties, or conditions of any kind, express or implied, including, without limitation, implied warranties or con
4、ditions concerning this documents fitness for a particular purpose or use, its merchantability, or its non-infringement of any third partys intellectual property rights. CSA does not warrant the accuracy, completeness, or currency of any of the information published in this document. CSA makes no re
5、presentations or warranties regarding this documents compliance with any applicable statute, rule, or regulation. IN NO EVENT SHALL CSA, ITS VOLUNTEERS, MEMBERS, SUBSIDIARIES, OR AFFILIATED COMPANIES, OR THEIR EMPLOYEES, DIRECTORS, OR OFFICERS, BE LIABLE FOR ANY DIRECT, INDIRECT, OR INCIDENTAL DAMAG
6、ES, INJURY, LOSS, COSTS, OR EXPENSES, HOWSOEVER CAUSED, INCLUDING BUT NOT LIMITED TO SPECIAL OR CONSEQUENTIAL DAMAGES, LOST REVENUE, BUSINESS INTERRUPTION, LOST OR DAMAGED DATA, OR ANY OTHER COMMERCIAL OR ECONOMIC LOSS, WHETHER BASED IN CONTRACT, TORT (INCLUDING NEGLIGENCE), OR ANY OTHER THEORY OF L
7、IABILITY, ARISING OUT OF OR RESULTING FROM ACCESS TO OR POSSESSION OR USE OF THIS DOCUMENT, EVEN IF CSA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES, INJURY, LOSS, COSTS, OR EXPENSES.In publishing and making this document available, CSA is not undertaking to render professional or other servi
8、ces for or on behalf of any person or entity or to perform any duty owed by any person or entity to another person or entity. The information in this document is directed to those who have the appropriate degree of experience to use and apply its contents, and CSA accepts no responsibility whatsoeve
9、r arising in any way from any and all use of or reliance on the information contained in this document. CSA is a private not-for-profit company that publishes voluntary standards and related documents. CSA has no power, nor does it undertake, to enforce compliance with the contents of the standards
10、or other documents it publishes. Intellectual property rights and ownershipAs between CSA and the users of this document (whether it be in printed or electronic form), CSA is the owner, or the authorized licensee, of all works contained herein that are protected by copyright, all trade-marks (except
11、 as otherwise noted to the contrary), and all inventions and trade secrets that may be contained in this document, whether or not such inventions and trade secrets are protected by patents and applications for patents. Without limitation, the unauthorized use, modification, copying, or disclosure of
12、 this document may violate laws that protect CSAs and/or others intellectual property and may give rise to a right in CSA and/or others to seek legal redress for such use, modification, copying, or disclosure. To the extent permitted by licence or by law, CSA reserves all intellectual property right
13、s in this document.Patent rightsAttention is drawn to the possibility that some of the elements of this standard may be the subject of patent rights. CSA shall not be held responsible for identifying any or all such patent rights. Users of this standard are expressly advised that determination of th
14、e validity of any such patent rights is entirely their own responsibility.Authorized use of this documentThis document is being provided by CSA for informational and non-commercial use only. The user of this document is authorized to do only the following:If this document is in electronic form:.load
15、 this document onto a computer for the sole purpose of reviewing it;.search and browse this document; and.print this document if it is in PDF format. Limited copies of this document in print or paper form may be distributed only to persons who are authorized by CSA to have such copies, and only if t
16、his Legal Notice appears on each such copy.In addition, users may not and may not permit others to.alter this document in any way or remove this Legal Notice from the attached standard;.sell this document without authorization from CSA; or.make an electronic copy of this document.If you do not agree
17、 with any of the terms and conditions contained in this Legal Notice, you may not load or use this document or make any copies of the contents hereof, and if you do make such copies, you are required to destroy them immediately. Use of this document constitutes your acceptance of the terms and condi
18、tions of this Legal Notice. ISO/IEC 2013. CSA Group 2015. All rights reserved. Unauthorized reproduction is strictly prohibited.Technical Corrigendum2:2015(IDT) toCAN/CSA-ISO/IEC 1539-1:12(ISO/IEC 1539-1:2010, IDT)National Standard of CanadaTechnical Corrigendum2:2015(IDT) to CAN/CSA-ISO/IEC 1539-1:
19、12Informationtechnology Programminglanguages FortranPart 1: Base language(ISO/IEC 1539-1:2010, IDT)Standards UpdateServiceTechnical Corrigendum 2:2015 (IDT) toCAN/CSA-ISO/IEC 1539-1:12January 2015Title: Information technology Programming languages Fortran Part 1: Base languageTo register for e-mail
20、notification about any updates to this publication go to shop.csa.ca click on CSA Update ServiceThe List ID that you will need to register for updates to this publication is 2421525.If you require assistance, please e-mail techsupportcsagroup.org or call 416-747-2233.Visit CSA Groups policy on priva
21、cy at csagroup.org/legalto find out how we protect your personalinformation.INTERNATIONAL STANDARD ISO/IEC 1539-1:2010TECHNICAL CORRIGENDUM 2 Published 2013-06-01 INTERNATIONAL ORGANIZATION FOR STANDARDIZATION ORGANISATION INTERNATIONALE DE NORMALISATIONINTERNATIONAL ELECTROTECHNICAL COMMISSION COMM
22、ISSION LECTROTECHNIQUE INTERNATIONALEInformation technology Programming languages Fortran Part 1: Base language TECHNICAL CORRIGENDUM 2 Technologies de linformation Langages de programmation Fortran Partie 1: Langage de base RECTIFICATIF TECHNIQUE 2 Technical Corrigendum 2 to ISO/IEC 1539-1:2010 was
23、 prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology, Subcommittee SC 22, Programming languages, their environments and system software interfaces. ICS 35.060 Ref. No. ISO/IEC 1539-1:2010/Cor.2:2013(E) ISO/IEC 2013 All rights reserved ISO/IEC/JTC1/SC22/WG5-N1958ISO/IEC 1539-1
24、:2010 - TECHNICAL CORRIGENDUM 2 IntroductionFollowing the second sentence in the fifth item in the bulleted list (Data usage and computation), insert: “Multiple allocations are permitted in a single ALLOCATE statement with SOURCE=.”.Subclause 1.6.2Replace the two paragraphs added to the subclause in
25、 Technical Corrigendum 1 by the following six paragraphs:Fortran 2003 permitted a sequence type to have type parameters; that is not permitted by this part of ISO/IEC 1539.Fortran 2003 specified that array constructors and structure constructors of finalizable type are finalized. This part of ISO/IE
26、C 1539 specifies that these constructors are not finalized.The form produced by the G edit descriptor for some values and some I/O rounding modes differs from that specified by Fortran 2003.Fortran 2003 required an explicit interface only for a procedure that was actually referenced in the scope, no
27、t merely passed as an actual argument. This part of ISO/IEC 1539 requires an explicit interface for a procedure under the conditions listed in 12.4.2.2, regardless of whether the procedure is referenced in the scope.Fortran 2003 permitted the result variable of a pure function to be a polymorphic al
28、locatable variable, or to be finalizable by an impure final subroutine. These are not permitted by this part of ISO/IEC 1539.Fortran 2003 permitted an INTENT(OUT) argument of a pure subroutine to be polymorphic; that is not permitted by this part of ISO/IEC 1539.Subclause 1.6.3Add the following item
29、 at the end of the bulleted list: The form produced by the G edit descriptor with d equal to zero differs from that specified by Fortran 95 for some values.Subclause 1.6.4In the fourth paragraph of the subclause, replace the full stop at the end of the third bulleted item by a semicolon and add a fo
30、urth item: the G edit descriptor with d equal to zero for some values.Subclause 4.4.2.3In the third paragraph of the subclause, in Note 4.8 change “can distinguish” to “distinguishes”.Subclause 4.5.2.3Replace constraint C436 by:C436 (R425) If SEQUENCE appears, each data component shall be declared t
31、o be of an intrinsic type or of a sequence type, the derived type shall not have type parameters, and a type-bound-procedure-part shall not appear.ISO/IEC 1539-1:2010/Cor.2:2013(E)2 ISO/IEC 2013 All rights reservedTechnical Corrigendum 2:2015 (IDT) to CAN/CSA-ISO/IEC 1539-1:12Subclause 4.5.2.4In the
32、 second sentence of the second paragraph of the subclause, delete “type parameters and”.Subclause 4.5.6.1In the second sentence of constraint C480, insert “noncoarray,” before “nonpointer”.Subclause 4.5.6.3To the second paragraph of the subclause (which was paragraph 1 prior to the edits of Technica
33、l Corrigendum 1), append the new sentence: If an error condition occurs during deallocation, it is processor dependent whether finalization occurs.Replace the seventh paragraph of the subclause (which was paragraph 8 prior to the edits of Technical Corrigendum 1) by the following new paragraph. This
34、 supersedes the substitute paragraph given in Technical Corrigendum 1.When a procedure is invoked, a nonpointer, nonallocatable INTENT(OUT) dummy argument of that procedure is finalized before it becomes undefined. The finalization caused by INTENT(OUT) is considered to occur within the invoked proc
35、edure; so for elemental procedures, an INTENT(OUT) argument will be finalized only if a scalar or elemental final subroutine is available, regardless of the rank of the actual argument.Subclause 4.8In constraint C4105 in the first paragraph of the subclause, change “all ac-value expressions in the a
36、rray-constructor shall be of that derived type and” to “the declared type of each ac-value expression in the array-constructor shall be that derived type and”.After constraint C4106, insert the following new constraint:C4106a (R472) The declared type of an ac-value shall not be abstract.In the secon
37、d paragraph of the subclause, change “each ac-value expression in the array constructor shall have the same length type parameters;” to “corresponding length type parameters of the declared type of each ac-value expression shall have the same value;”.In the third paragraph of the subclause, after “E
38、ach value is converted to the” insert “type and”.Subclause 5.3.7In the first paragraph of the subclause, change “can only be argument associated with a contiguous effective argument” to “is contiguous”.Subclause 5.3.10In constraint C541 change “An entity” to “A dummy argument of a nonintrinsic proce
39、dure”.Subclause 5.4.7In the fourth paragraph of the subclause, replace constraint C566 by:C566 (R536) A data-stmt-object that is a variable shall be a designator. Each subscript, section subscript, substring starting point, and substring ending point in the variable shall be a constant expression.Su
40、bclause 5.5In the final sentence of the third paragraph of the subclause, change “an internal or module procedure” to “a BLOCK construct, internal subprogram, or module subprogram”.ISO/IEC 1539-1:2010/Cor.2:2013(E)3 ISO/IEC 2013 All rights reservedTechnical Corrigendum 2:2015 (IDT) to CAN/CSA-ISO/IE
41、C 1539-1:12Subclause 5.6In the fifth paragraph of the subclause, change what was originally “type, type parameters, and shape” but which was changed by Technical Corrigendum 1 to “type, kind type parameters, and rank” to “declared type, kind type parameters of the declared type, and rank”.Subclause
42、6.7.1.1Replace constraint C633 by:C633 (R626) If an allocate-object is an array, either allocate-shape-spec-list shall appear in its allocation, or source-expr shall appear in the ALLOCATE statement and have the same rank as the allocate-object.C633a (R631) If allocate-object is scalar, allocate-sha
43、pe-spec-list shall not appear.Replace constraint C639 by:C639 (R626) If source-expr appears, the kind type parameters of each allocate-object shall have the same values as the corresponding type parameters of source-expr.Replace the fourth paragraph of the subclause by:If an allocate-object is a coa
44、rray, the ALLOCATE statement shall not have a source-expr with a dynamic type of C_PTR, C_FUNPTR, or LOCK_TYPE, or which has a subcomponent whose dynamic type is LOCK_TYPE.Subclause 6.7.1.2In the seventh paragraph of the subclause, before “On successful”, insert the new sentence:If an allocate-objec
45、t is not polymorphic and the source-expr is polymorphic with a dynamic type that differs from its declared type, the value provided for that allocate-object is the ancestor component of the source-expr that has the type of the allocate-object; otherwise, the value provided is the value of the source
46、-expr.In the sentence beginning “On successful”, replace “that of source-expr” with “the value provided”, twice.At the end of the seventh paragraph append the new sentence:The source-expr is evaluated exactly once for each execution of an ALLOCATE statement.Subclause 6.7.3.2Append the following new
47、sentence to the eighth paragraph of the subclause:If an error condition occurs during deallocation, it is processor dependent whether an allocated allocatable subobject is deallocated.Subclause 7.1.12In the first paragraph of the subclause, in item (6) of the numbered list, after “THIS_IMAGE” insert
48、“, or TRANSFER”.After item (7) of the numbered list, insert new item:(7a) A reference to the intrinsic function TRANSFER where each argument is a constant expression and each ultimate pointer component of the SOURCE argument is disassociated.ISO/IEC 1539-1:2010/Cor.2:2013(E)4 ISO/IEC 2013 All rights
49、 reservedTechnical Corrigendum 2:2015 (IDT) to CAN/CSA-ISO/IEC 1539-1:12Subclause 7.2.2.2In constraint C729 replace “an external . bullet ()” with “a specific intrinsic function listed in 13.6 and not marked with a bullet (), or an external procedure that is accessed by use or host association, referenced in the scoping unit as a procedure, or that has the EXTERNAL attribute”.Subclause 8.5.1In the bulleted list in the second paragraph of the su