WPC" C^"q#{/!t^ R Tsқj2NI$ m?'u}1lKIh@Lw̟ۗ.9LY}K%:alGVz;a[[}HpwUtHs3xn:Eة0ؑNU;q⠐>804[8RQvw-/`z]{2E LSUW)y>NVP#h=bאr>O[ bAkR-h2q<Lg[{;ؾ0ɒ:_;sriɊo#X6B.RO9Z+I$Cv헋Mg`.q|H]S<АDDSo4rH043yteJe$<\;9k5O&XgZ;C+\hjewG6_>g %U: 0# z}   0xn4NL^ NwZ4^r m 0~e t 1~ 72 1u7 72 0;c 1 A 72B 0w< 0UT= 0 01 0 0 0 0Dv 1! 72E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E"E" Bw"w"w"w"w"w"w" B-""""" B"""Arial Regular(ƕ$XXXXUSUS.,$X,X$      =^dd=HP LaserJet 5M PCL,,,,0C:\COREL\WORDPE~1\TEMPLATE\CUSTOM~1\CUSTOM~1\ANSIJ3~2.WPTC:\Corel\WordPerfect Office 2000\Template\Custom WP Templates\Custom WP Templates\ANSI J3 Unresolved Issues.wpt  |'USUS.,$X,X$   _@(# J3/01_Ԅ240  X NCITS_Ԁ/J3ANSIFortranStandardsCommittee>(#CraigT.Dedo , _RepresentationofEORinFormattedStreamI/O_________VV?(#_June5,2001_Ԉ L @(#Page  1  ڀof  3  (3|$ ƕ!XXUSUS.,$X,X$      =^dd=  ݁Level 1Level 2Level 3Level 4Level 5Level 1Level 2Level 3Level 4Level 5Level 1Level 2Level 3Level 4Level 5Level 1Level 2Level 3Level 4Level 5Level 1Level 2Level 3Level 4Level 5ʶ* *3|xU |)USUS.,$X,X$   _.D4C:\ANSI_J3\157\01-240a.wpdDC:\ANSI_J3\157\01-240a.wpd/  (3|$ ƕ!XXUSUS.,$X,X$      =^dd=   05hCEKQW]cioAutoList11.1.1.1.1.1.1.1.1.3#37=CIQYag1.a.i.(1)(a)(i)1)a)i)(;3$2#  0  .3  0  (EhCEKQW]cioAutoList21.1.1.1.1.1.1.1.1.Design Considerations for Stream I/O  ( ' $Craig T. Dedo$0Craig T. Dedop17130 W. Burleigh Place Brookfield, WI 53005-2759 01-119 .    3 2(O;$0  2#  a  .3  0` (#(#(b$0  0` (#(#2#   .3  0 ` (#` (#/ Z<Century Schoolbook Regular(xir$0  0` (#(#0 ` (#` (#2#(  0  )3  0 (# (#($0  0` (#(#0 ` (#` (#0 (# (#2#(  a  )3  0h(#(#(F$0  0` (#(#0 ` (#` (#0 (# (#0h(#(#2#(   )3  0h(#h(#($0  0` (#(#0 ` (#` (#0 (# (#0h(#(#0h(#h(#2#  0  )3  0(#(#({$0  0` (#(#0 ` (#` (#0 (# (#0h(#(#0h(#h(#0(#(#2#  a  )3  0p(#(#(F$0  0` (#(#0 ` (#` (#0 (# (#0h(#(#0h(#h(#0(#(#0p(#(#2#     )3  0p(#p(#  !#$%&'xIcgkosw{Large BulletLarge Bullet)( d)Hairline d  d ƕ!XXUSUS.,$X,X$      =^dd=  _  @_ RepresentationofEORinFormattedStreamI/O   To:0  0(#(#04(#(#J34(#4(# From:0  04(#(#CraigDedo` 4(#4(# Date:0  04(#(#June5,2001( 4(#4(# Subject:0 4 RepresentationofEORinFormattedStreamI/O L4(#4(#   Shouldthecharacterrepresentedbythelinefeedcharacter,_ACHAR_(10),oranyothercharacter,   beusedtodelimittheendofrecord(EOR)informattedstreamI/O? H    Thereisaproposalinsection2.2of01-193r1toreplacethecurrentspecificationin[221:7-13] 4  withanamedconstantspecifiedinthe_ISO_FORTRAN_ENV_Ԁmodule.Anotheralternativeisto   simplydependontheexistingpracticeofusingtheslash(/)editdescriptortospecifyEOR. h    Thispaperpresentsthevariousalternatives,theiradvantagesanddisadvantages,andproposes T  astrawvoteonwhichalternativetoimplementinFortran2000.    (5h83 Analysis  P    StreamI/OwasoriginallyproposedbyWG5workitems63and63aasaFortran2000featureso t thatFortranprogramscouldreadfromandwritetofilesinformatsthatarecommonlyusedbyC < languageprocessorsandinbinaryformatsthathavelittleornointernalrecordstructure[98-209r2].    ItisclearfromthehistoryofthestreamI/Ofeaturethatcompatibilitywithfilesreadfromand 8 writtentobyClanguageprocessorsismandatory.Otherdesignprinciplesandassumptionsare \ listedin01-208. $   Itiscommonlybelievedthatthelinefeedcharacter,representedbyACHAR(10)intheASCII X collatingsequence,isthewaythatClanguageprocessorsuniversallyrepresenttheendofalineof  | text.Althoughverywidespread,theClanguagestandarddoesnotmandatethispractice.Section D 5.2.1oftheCstandardsays,inpart, Insourcefiles,thereshallbesomewayofindicatingtheendof   eachlineoftext;thisInternationalStandardtreatssuchanendoflineindicatorasifitwereasingle x newlinecharacter.Inthebasicexecutioncharacterset,thereshallbecontrolcharacters @ representingalert,backspace,carriagereturn,andnewline.  d    Section7.19.2specifiesthepropertiesofCfilestreams.Itsays,inpart, Atextstreamisan !" orderedsequenceofcharacterscomposedintolines,eachlineconsistingofzeroormorecharacters `"# plusaterminatingnewlinecharacter.Whetherthelastlinerequiresaterminatingnewline (#$ characterisimplementationdefined.Charactersmayhavetobeadded,altered,ordeletedoninput #L% andoutputtoconformtodifferingconventionsforrepresentingtextinthehostenvironment.Thus, $& thereneednotbeaonetoonecorrespondencebetweenthecharactersinastreamandthoseinthe %' externalrepresentation. H&(   ItishighlyunlikelythatvendorsofFortranprocessorswilldevelopanimplementationof '4!* formattedstreamI/OthatisincompatiblewiththeneedsofClanguageprocessorsthatusethesame (!+ hostoperatingsystemandfilesystem.ThehistoryofthestreamI/Ofeaturemakesitclearthat h)", compatibilitywithfileswrittentoandreadfromCisthetoppriority.Customerswilldemandthat 0*#- Fortranprocessorsachievethisgoal. *T$.   Rightnow,therearethreepossiblemethodsunderconsiderationforrepresentingEORin ,%0 formattedstreamI/O. P-&1  (Eh88"3"    32Eh  1  .3  0    UseACHAR(10)astheEORcharacter.3݌.t'2(#(# Ќ  "3"    32Eh  2  .3  0    UseacharacterdesignatedbyanamedconstantintheISO_FORTRAN_ENVmodule.3݌.<(3(#(# Ќ  "3"    32Eh  3  .3  0    Useonlytheslash(/)editdescriptor.30݌(#(# Ќ  Followingisasurveyoftheadvantagesanddisadvantagesofeachalternative. l &  _ACHAR_(10)asEOR. X 0  Advantages. (#(# ! ! (Eh88"3"  0  0(#(#32Eh  1  .3  04(#(#  ProvidesaplausibleformofportabilitybetweendifferentFortranprocessorsonthesame   platform.3݌T 4(#4(# Ќ  0  Disadvantages. x(#(# ! ! (Eh88"3"  0  0(#(#32Eh  1  .3  04(#(#  Possibleconflictswithstandardsandconventionsofsomehostoperatingsystemsandfile'W  @ systems.Theymayallow_ACHAR_(10)asalegalcharacterwithinarecord.Paper01-210    discussesthesepossibleconflictsinsomedetail.3)݌t 4(#4(# Ќ  "3"  0  0(#(#3 2Eh  2  .3  04(#(#  Redundantwithrespecttoslasheditdescriptor.3 X݌< 4(#4(# Ќ  NamedConstantasEOR (  0  Advantages. (#(# ! ! (Eh88"3"  0  0(#(#3A2Eh  1  .3  04(#(#  Allowsprocessorfreedomofimplementationandabilitytoadapttothepeculiar \  conditionsofthehostenvironment.3A݌$ 4(#4(# Ќ  "3"  0  0(#(#32Eh  2  .3  04(#(#  Doesnotassignpeculiarmagicpropertiestoanyarticularcharacter.3 ݌H 4(#4(# Ќ  0  Disadvantages.(#(# ! ! (Eh88"3"  0  0(#(#3!2Eh  1  .3  04(#(#  Mayintroduceincompatibilitiesbetweendifferentprocessorsinthesamehost | environment.3!"݌D4(#4(# Ќ  "3"  0  0(#(#3/#2Eh  2  .3  04(#(#  MaycreatefilesthatcannotbereadfromC.3/#|#݌ h4(#4(# Ќ  "3"  0  0(#(#3L$2Eh  3  .3  04(#(#  MaynotbeabletoreadfilescreatedandwrittentobyC.3L$$݌04(#4(# Ќ  "3"  0  0(#(#3w%2Eh  4  .3  04(#(#  Redundantwithrespecttoslasheditdescriptor.3w%%݌4(#4(# Ќ  Slash(/)EditDescriptorOnlyasEOR , 0  Advantages.P(#(# ! ! (Eh88"3"  0  0(#(#3'2Eh  1  .3  04(#(#  AlreadypartofFortran,henceitsbehaviorisalreadywellunderstood.3' (݌4(#4(# Ќ  "3"  0  0(#(#3(2Eh  2  .3  04(#(#  PortablebetweendifferentFortranprocessorsonthesamehostoperatingsystemandfile  system.3(B)݌L4(#4(# Ќ  "3"  0  0(#(#3Z*2Eh  3  .3  04(#(#  Portablebetweendifferenthostoperatingsystemsandfilesystems.3Z**݌p4(#4(# Ќ  "3"  0  0(#(#3+2Eh  4  .3  04(#(#  CanbeimplementedinstreamI/Oinawaythatiscompatiblewiththehostoperating 8 systemandhostfilesystem.3++݌ 4(#4(# Ќ  "3"  0  0(#(#3-2Eh  5  .3  04(#(#  CanbeimplementedinstreamI/Oinawaythatiscompatiblewiththeconventionsused l ! byCprocessorsinthehostenvironment.3-Q-݌4!"4(#4(# Ќ  0  Disadvantages.!X#(#(# ! ! (Eh88"3"  0  0(#(#3i/2Eh  1  .3  04(#(#  MaycreatefilesthatcannotbereadfromC.3i//݌" $4(#4(# Ќ  "3"  0  0(#(#302Eh  2  .3  04(#(#  MaynotbeabletoreadfilescreatedandwrittentobyC.300݌#%4(#4(# Ќ  StrawVote: 0 ` HowshouldwerepresentEORinformattedstreamI/O?%x'` (#` (# 0  Option1:0` (#(#Thelinefeedcharacter,ACHAR(10),representsEOR.%@(` (#` (# 0  Option2:0` (#(#UseacharacterrepresentedbyanamedconstantintheISO_FORTRAN_ENV & ) module.t' *` (#` (# 0  Option3:0` (#(#Useonlytheslash(/)editdescriptor.<(!+` (#` (# 0  Undecided)`",(#(#  &  CurrentLanguage  *#.   Hereisthecurrentlanguageinsection10.6.3[221:7-13]. \+$/   8  Ifthefileisconnectedforstreamaccess,theoutputmaybesplitacrossmorethanonerecord ,H&1 ifitcontainsnewlinecharacters.Anewlinecharacteristhecharacterreturnedbytheintrinsic -'2 '*3functionreferenceACHAR(10).Beginningwiththefirstcharacteroftheoutputfield,each |.'3 characterthatisnotanewlineiswrittentothecurrentrecordinsuccessivepositions;each  newlinecharactercausesfilepositioningatthatpointasifbyslashediting(thecurrentrecord l isterminatedatthatpoint,anewemptyrecordiscreatedfollowingthecurrentrecord,thisnew 4 recordbecomesthelastandcurrentrecordofthefile,andthefileispositionedatthebeginning X ofthisnewrecord). !! }4 References  T  01-007r1,Fortran2000Draft  x 01-193r1,MiscellaneousRemarks  @ 01-208,DesignConsiderationsforStreamI/O    01-210,Issue128EmptyIncompleteRecord t  98-209r2,SpecsandSyntaxforM.25,StreamI/O <  98-211r2,EditsforM.25,StreamI/O `  99-110r1,StreamI/OSuggestedChanges(UnresolvedIssue68) (  0   CompaqComputerCorporation,GuidetoOpenVMSFileApplications,Chapter2, ChoosingaFile   Organization(Website:www.openvms.compaq.com:8000/72final/4506/4506_pro)\ (#(# ISO/IEC9899:1999,InternationalStandardProgrammingLanguagesC $  [EndofJ3/01-240]