1、| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BRITISH STANDARD BS ISO/IEC 1539-2:2000 IC
2、S 35.060 NO COPYING WITHOUT BSI PERMISSION EXCEPT AS PERMITTED BY COPYRIGHT LAW Information technology Programming languages Fortran Part 2: Varying length character stringsThis British Standard, having been prepared under the direction of the DISC Board, was published under the authority of the Sta
3、ndards Committee and comes into effect on 15 November 2000 BSI 11-2000 ISBN 0 580 36675 8 BS ISO/IEC 1539-2:2000 Amendments issued since publication Amd. No. Date Comments National foreword This British Standard reproduces verbatim ISO/IEC 1539-2:2000 and implements it as the UK national standard. T
4、he UK participation in its preparation was entrusted to Technical Committee IST/5, Programming languauges, Their Environments and System Software, which has the responsibility to: aid enquirers to understand the text; present to the responsible international/European committee any enquiries on the i
5、nterpretation, or proposals for change, and keep the UK interests informed; monitor related international and European developments and promulgate them in the UK. A list of organizations represented on this committee can be obtained on request to its secretary. Cross-references The British Standards
6、 which implement international or European publications referred to in this document may be found in the BSI Standards Catalogue under the section entitled “International Standards Correspondence Index”, or by using the “Find” facility of the BSI Standards Electronic Catalogue. A British Standard do
7、es not purport to include all the necessary provisions of a contract. Users of British Standards are responsible for their correct application. Compliance with a British Standard does not of itself confer immunity from legal obligations. Summary of pages This document comprises a front cover, an ins
8、ide front cover, the ISO/IEC title page, pages ii to vi, pages 1 to 20, an inside back cover and a back cover. The BSI copyright notice displayed in this document indicates when the document was last issued.Referencenumber ISO/IEC1539-2:2000(E) INTERNATIONAL STANDARD ISO/IEC 1539-2 Secondedition 200
9、0-06-01 InformationtechnologyProgramming languagesFortran Part2: Varyinglengthcharacterstrings Technologies de linformation Langages de programmation Fortran Partie 2: Chanes de caractres de longueur variableISO/IEC1539-2:2000(E) ii ISO/IEC1539-2:2000(E) CONTENTS 1 Scope1 2 NormativeReferences2 3 Re
10、quirements3 3.1 TheNameoftheModule3 3.2 TheType3 3.3 ExtendedMeaningsforIntrinsicOperators3 3.3.1 Assignment3 3.3.2 Concatenation4 3.3.3 Comparisons4 3.4 ExtendedMeaningsforGenericIntrinsicProcedures5 3.4.1 ADJUSTL(string)5 3.4.2 ADJUSTR(string)5 3.4.3 CHAR(string,length)5 3.4.4 IACHAR(c)6 3.4.5 ICH
11、AR(c)6 3.4.6 INDEX(string,substring,back)6 3.4.7 LEN(string)7 3.4.8 LEN_TRIM(string)7 3.4.9 LGE(string_a,string_b)7 3.4.10 LGT(string_a,string_b)7 3.4.11 LLE(string_a,string_b)8 3.4.12 LLT(string_a,string_b)8 3.4.13 REPEAT(string,ncopies)9 3.4.14 SCAN(string,set,back)9 3.4.15 TRIM(string)9 3.4.16 VE
12、RIFY(string,set,back) 10 3.5 AdditionalGenericProcedureforTypeConversion 10 3.5.1 VAR_STR(char) 10 3.6 AdditionalGenericProceduresforInput/Output 11 3.6.1 GET(string,maxlen,iostat)or GET(unit,string,maxlen,iostat)or GET(string,set,separator,maxlen,iostat)or GET(unit,string,set,separator,maxlen,iosta
13、t) 11 3.6.2 PUT(string,iostat)orPUT(unit,string,iostat) 12 3.6.3 PUT_LINE(string,iostat)orPUT_LINE(unit,string,iostat) 12 3.7 AdditionalGenericProceduresforSubstringManipulation 12 3.7.1 EXTRACT(string,start,finish) 13 3.7.2 INSERT(string,start,substring) 13 3.7.3 REMOVE(string,start,finish) 13 3.7.
14、4 REPLACE(string,start,substring)or REPLACE(string,start,finish,substring)or REPLACE(string,target,substring,every,back) 14iiiISO/IEC1539-2:2000(E) 3.7.5 SPLIT(string,word,set,separator,back) 15 AnnexA(informative).ModuleISO_VARYING_STRING 16 AnnexB(informative).Twoexamples 17 B.1Wordcount 17 B.2Voc
15、abularylist 18 iv ISO/IEC1539-2:2000(E)v Foreword ISO(theInternationalOrganizationforStandardization)andIEC(theInternationalElectrotechnicalCommission) formthespecializedsystemforworldwidestandardization.NationalbodiesthataremembersofISOorIEC participateinthedevelopmentofInternationalStandardsthroug
16、htechnicalcommitteesestablishedbythe respectiveorganizationtodealwithparticularfieldsoftechnicalactivity.ISOandIECtechnicalcommittees collaborateinfieldsofmutualinterest.Otherinternationalorganizations,governmentalandnon-governmental,in liaisonwithISOandIEC,alsotakepartinthework. InternationalStanda
17、rdsaredraftedinaccordancewiththerulesgivenintheISO/IECDirectives,Part3. Inthefieldofinformationtechnology,ISOandIEChaveestablishedajointtechnicalcommittee,ISO/IECJTC1. DraftInternationalStandardsadoptedbythejointtechnicalcommitteearecirculatedtonationalbodiesforvoting. PublicationasanInternationalSt
18、andardrequiresapprovalbyatleast75%ofthenationalbodiescastingavote. AttentionisdrawntothepossibilitythatsomeoftheelementsofthispartofISO/IEC1539maybethesubjectof patentrights.ISOandIECshallnotbeheldresponsibleforidentifyinganyorallsuchpatentrights. InternationalStandardISO/IEC1539-2waspreparedbyJoint
19、TechnicalCommitteeISO/IECJTC1, Information technology, Subcommittee SC 22, Programming languages, their environments and system software interfaces. Thissecondeditioncancelsandreplacesthefirstedition(ISO/IEC1539-2:1994),whichhasbeentechnically revised.Thefollowingsummarisesthechangesmadetothefacilit
20、iesprovidedbythispartofISO/IEC1539: Theassignment,concatenation,andcomparisonoperationsareextendedtodescribeelementalsemantics. CHARisextendedtodescribepuresemantics. ADJUSTL,ADJUSTR,EXTRACT,IACHAR,ICHAR,INDEX,INSERT,LEN,LEN_TRIM,LGE,LGT,LLE,LLT, REMOVE,REPEAT,REPLACE,SCAN,SPLIT,TRIM,VAR_STR,andVERI
21、FYareallextendedtodescribe elementalsemantics. ISO/IEC1539consistsofthefollowingparts,underthegeneraltitle Information technology Programming languages Fortran: Part 1: Base language Part 2: Varying length character strings AnnexesAandBofthispartofISO/IEC1539areforinformationonly.ISO/IEC1539-2:2000(
22、E) Introduction ThispartofISO/IEC1539hasbeenpreparedbyISO/IECJTC1/SC22/WG5,thetechnicalworkinggroupfor theFortranlanguage.ThispartofISO/IEC1539isanauxiliarystandardtoISO/IEC1539-1:1997,which definesthelatestrevisionoftheFortranlanguage,andisthefirstpartofthemultipartFortranfamilyof standards;thispar
23、tofISO/IEC1539isthesecondpart.TherevisedlanguagedefinedbyISO/IEC1539-1: 1997isinformallyknownasFortran95. ThispartofISO/IEC1539definestheinterfaceandsemanticsforamodulethatprovidesfacilitiesforthe manipulationofcharacterstringsofarbitraryanddynamicallyvariablelength.AnnexAreferstoapossible implement
24、ation,inFortran95,ofamodulethatconformstothispartofISO/IEC1539.Itshouldbenoted, however,thatthisispurelyforpurposesofdemonstratingthefeasibilityandportabilityofthisstandard.The actualcodeisnotintendedinanywaytoprescribethemethodofimplementation,noristhereanyimplication thatthisisinanywayanoptimalpor
25、tableimplementation.Themoduleismerelyafairlystraightforward demonstrationthataportableimplementationispossible. ThisstandardisadevelopmentfromapreviousversionknownasISO/IEC1539-2:1994thattakesaccountof theimprovementsintroducedinFortran95.ThemostsignificantimprovementsinFortran95forthepresent standa
26、rdweretheintroductionofpureandelementalprocedures.Sincepureandelementalfunctionscanbe usedinspecificationexpressions,theirintroductioninthisstandardenhancestheusabilityofthestandardfor theenduser.Theabilitytodefinemanyofthefunctionsspecifiedinthisstandardtobeelementalimprovesthe compatibilityofthesefunctionswithsimilarintrinsicfunctionsdefinedbythemainstandard. TheimprovementsintypeinitializationprovidedinFortran95havealsoenabledthesampleimplementation referredtoinAnnexAtobewritteninsuchawaythatsignificantleakageofmemoryislesslikelytooccur. vi 1
copyright@ 2008-2019 麦多课文库(www.mydoc123.com)网站版权所有
备案/许可证编号:苏ICP备17064731号-1