ÿWPC7 U¥WêÏZ™­!oÚG¬p—â4É£ÀªÊ«6‘¯†¿û(…2jˆh\$µbk’b­ªÍ{Ѐ‡”½G?¬\¬še“Ĥ`¯§óŸ‹sµˆöÆ{‘¯i%áËtYTjn…DÃ?Fe @G3ì+r˜i½R¢[¹!sæw#´²ˆk˜ŠŸ/ë?·Iu¡XRiÐ[1K$ù C‰–¢4Ÿãÿñ<ÖqzW¬ò*¡9ÜãŠÓ¨Â ‡üGëï|ÿ\UÄŸ,ÛpQ+Swo¡þ?˜|°lÝuùçÎz^+‘†òr?T™lV’]fjó§Ø™‡¡õú6,¬&°|Ô¡¬áŽÞû¨«ÕÞ±KŽo·P+«s)]¯@p˜ 4g&Ô5)M ¥ôª‚۲ᎡlÖ –}? ig¢c‹&ÏXÄÇ¿‰.še¦ÊbÁmÿ^rYïÑOs®Û§ÿŸ´û¦L“³s-›Ð„ŰL¶ÂyåæÜÏ:¥œ8œ?ܘ Âø FP&ì2 k,úZ1jZh߇­Úì¢.v0Žäú\‰¼ãkÜ8„A–!ó«æQssç›eaRF«T-£ÄÖê›§·ÀÔùÑiRqHz~0Õ‚y<ÌÙò°wñ:˜ìXPÙ7wcU&Pj %º 0§À 0ÂgL) u n} Æ€ eF ¡G 0eè TMÍ¡ 0Ãn 1 0e7Xœw@ô44HbW¹ m» 1mÒ DC?°‚ B-2 1m_̆ԠZUPúUTJ #!ž UT¿!£"UP¶$UT%U TZ% 0î% D3q& B¤& 0 ÃÁ&Z„'„'Þ)Þ)[ù+ AQT.Æ¥. 0Dk/ D/¯/ BÞ/Þ/Œû/û/û/‹‡1‡1‡1Æ3 0@Ø3Ø3Ø3Ø3Ø3Ø3Ø3Ø3Æ4 0sÞ4ÆQ5 0‡666666666666 Cž6ž6ž6ž6ž6ž6ž6ž6ž6ž6ž6ž6ž6 0L¸6«gQ¨Z8NewCenturySchlbk Regularõ(¥¿$¡¡Ó  ÓÔ€ô@D õ õôÔÔ€ô@D õ õô@DÔÓ °°-°œXÓÔ  ÔÑ  Ñ(š2ÞÕ$§§Ý ƒ¥¿!ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÑ  ÑÝ  Ýd:\office\wpwin\template\x3j3-rpt.wpt«<þ6X9`(CourierXÛxþ6X@ÉüKX@<þ6X9`(CourierôŒdþ6X@ÉüKô@+˜à`4New Century SchoolbookôÓe˜à Pâ’'CôPA, B,Level 1Level 2Level 3Level 4Level 5 —Ý ƒÞÕ'ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ'ô]Šõõôƒ5ÔÓ °°§,°°-Óà€dd@(#àÔ‡'»kM»õ'ô]ŠÔò òJ3€/€98-115Ô#†'ô]Šõ»'»kMÞ#Ôó óˆÐ X ТNCITS£€¢J3£€ANSI€Fortran€Standards€Committeeà€ìì>(#àCraig€T.€DedoˆÐ d  ÐCommand€Line€Arguments€&€Environment€Variablesà€ôô;(#àFebruary€1,€1998ˆÐ ,Ô ÐProposal€„€Iterative€Modelà€ØØØ(#àPage€Ú  Ú1Ú  Ú€of€Ú  Ú8Ú  ÚÔ#†ôƒ5õõ'ô]Š#Ô4#(¾2Quick A.ÚƒÚÚ  Ú.à0 àÛ€Û˜c:\COREL\OFFICE7\TEMPLATE\X3J3DO~1.WPT ÛÔ‡'õ]ŠõõõÔÓ °°§,°œXÓòòÔ.<ƒ ,D:\X3J3\144\98-115.wpd<ÔD:\X3J3\144\98-115.wpdÔ/  ÔóóÔ#†õƒ5õõ'õ]Š#Ô(›3ký$©©Ý ƒ¥¿!ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÑ  ÑÝ  ÝH4#:.2Quick 1.ÚƒFÚÚ  Ú.à0 àÛ€FÛc:\Corel\Office7\Template\X3J3 Document.wpt ÒÓÔÕÖ×ÏÚÛÏÞEßî³A$Ðó„3|xß XÝ ƒ+ký"ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ!ô]Šõõôƒ5ÔOn€some€operating€systems,€it€is€possible€that€the€parsed€command€line€arguments€are€availableÐ  Ðbut€the€entire€unparsed€command€line€is€not€available.€€In€such€situations,€it€would€be€standardÏconforming€for€a€processor€to€return€the€command€line€arguments€in€the€VALUE€argument€ofÏISO_GET_COMMAND_ARGUMENT€and,€at€the€same€time,€return€all€blanks€in€the€VALUEÏargument€of€ISO_GET_UNPARSED_COMMAND.€€It€also€would€be€standard€conforming€for€aÏprocessor€in€such€situations€to€return€the€concatenation€of€all€of€the€VALUE€arguments€ofÏISO_GET_COMMAND_ARGUMENT€as€the€return€value€of€the€VALUE€argument€ofÏISO_GET_UNPARSED_COMMAND.Ô#†ôƒ5õõ!ô]Š#ÔÿU‹ÿÀÀÀ' e37=CIQYag³³1.a.i.(1)(a)(i)1)a)7HairlinedxdCommand Line Arguments & Environment Variables - Proposal - Iterative Model Î-$Craig T. Dedo$0Craig T. Dedo J3 / 97-201f.Command Line Arguments & Environment Variables" Fortran 2000f17130 W. Burleigh Place ùBrookfield, WI 53005&/(414) 783-5869   ( )0 ' L-Fortran 2000 Requirement Approved\ NCITS J3 ANSI Fortran Standards Committee*American English )Hairline d# e37=CIQYag­­1.a.i.(1)(a)(i)1)a)  |Ý ƒ+ký"ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ'ô]Šõõôƒ5ÔThe€length€of€the€program€name€could€be€longer€than€the€position€of€the€last€non-blank€characterÐ  Ðif€some€or€all€of€the€trailing€blanks€are€significant.Ô#†ôƒ5õõ'ô]Š#Ô –Ý ƒÞÕ'ÝÓ  ÓÔ€ õƒ5õõõÔÔ€ ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ#ô]”õõôƒ5ÔÓ °°§,°°-Óà€TT@(#àÔ‡#»kS»õ'ô]”Ôò òJ3€/€98¢-1aa£Ô#†#ô]”õ»'»kSÞ#Ôó óˆÐ X ТNCITS£€¢J3£€ANSI€Fortran€Standards€Committeeà€ìì>(#àCraig€T.€DedoˆÐ d  ÐCommand€Line€Arguments€&€Environment€Variablesà€ôô;(#àFebruary€1,€1998ˆÐ ,Ô ÐTechnical€Specificationà€ØØØ(#àPage€Ú  Ú1Ú  Ú€of€Ú  Ú8Ú  ÚÔ#† ôƒ5õõ'ô]”#Ô«gQ¨Z8NewCenturySchlbk RegularŠ ^ Z‹<Century Schoolbook Regular˜Oki OL840-PS v51.8œ”hh”œ0Š ^ Z‹<Century Schoolbook Regular ™Ý ƒÞÕ'ÝÓ  ÓÔ€%õƒ5õõõÔÔ€%ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ&ô]Šõõôƒ5ÔÓ °°§,°°-Óà€TT@(#àÔ‡&»kM»õ'ô]ŠÔò òJ3€/€98¢-1aa£Ô#†&ô]Šõ»'»kMÞ#Ôó óˆÐ X ТNCITS£€¢J3£€ANSI€Fortran€Standards€Committeeà€ìì>(#àCraig€T.€DedoˆÐ d  ÐCommand€Line€Arguments€&€Environment€Variablesà€ôô;(#àFebruary€1,€1998ˆÐ ,Ô ÐProposal€„€Iterative€Modelà€ØØ@(#àPage€Ú  Ú1Ú  Ú€of€Ú  Ú8Ú  ÚÔ#†%ôƒ5õõ'ô]Š#Ô«gQ¨Z8NewCenturySchlbk RegularŠ ^ Z‹<Century Schoolbook RegularŠ ^ Z‹<Century Schoolbook Regular(›3ký$££Ý ƒ¥¿!ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÑ  ÑÝ  Ý****'ÿÿdxd d(›3ký$¢¢Ý ƒ¥¿!ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÑ  ÑÝ  Ý PÝ ƒ+ký"ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ'ô]Šõõôƒ5ÔThe€command€line€tail€need€not€physically€follow€the€program€name.€€It€could€come€before€theÐ  Ðprogram€name,€both€before€and€after,€or€be€associated€with€the€program€name€in€some€otherÏfashion.€€An€example€of€this€last€option€would€be€a€list€of€resources€and€other€objects€associatedÏwith€the€program€at€startup€in€a€Graphical€User€Interface€(GUI)€operating€system.Ô#†ôƒ5õõ'ô]Š#Ô Ý ƒ+ký"ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ'ô]Šõõôƒ5ÔOn€some€operating€systems,€it€is€possible€to€have€more€than€one€entity€with€the€same€nameÐ  Ðsimultaneously€(by€having€the€name€defined€at€different€levels€or€in€different€contexts).€€In€suchÏcases,€the€rules€for€determining€the€values€of€such€multiply€defined€names€are€defined€by€theÏoperating€system.Ô#†ôƒ5õõ'ô]Š#Ô QÝ ƒ+ký"ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ'ô]Šõõôƒ5ÔCommand€argument€delimiters€and€position€numbers€are€defined€in€this€way€in€order€to€allowÐ  Ðthe€processor€the€maximum€amount€of€flexibility€to€implement€delimiters€and€position€numbersÏas€may€be€required€by€the€host€operating€system.€€There€also€is€flexibility€for€the€processor€toÏdefine€delimiters€and€position€numbers€in€case€the€operating€system€does€not€do€so.Ô#†ôƒ5õõ'ô]Š#Ô2+(34Cþÿ<<CÿÿƒLevel 1Level 2Level 3Level 4Level 5($$””ò òÚ  Ú1Ú  Úó ó55'÷ÿ dxdüÿP Pd ‚Ý ƒ+ký"ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ'ô]Šõõôƒ5ÔThe€length€of€some€command€arguments€could€be€longer€than€the€position€of€the€last€non-blankÐ  Ðcharacter€if€some€or€all€of€the€trailing€blanks€are€significant.Ô#†ôƒ5õõ'ô]Š#Ô Ý ƒ+ký"ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ'ô]Šõõôƒ5ÔThe€length€of€the€command€line€tail€could€be€longer€than€the€position€of€the€last€non-blankÐ  Ðcharacter€if€some€or€all€of€the€trailing€blanks€are€significant.Ô#†ôƒ5õõ'ô]Š#ÔLevel 1Level 2Level 3Level 4Level 52ßb0Quick ððà0 à1, 2, 3,Level 1Level 2Level 3Level 4Level 5B#:.21, 2, 3,NumbersÚƒFÚÚ  Ú.à0 àÛ€FÛa, b, c,Level 1Level 2Level 3Level 4Level 5V#:¾2a, b, c,Lowercase LettersÚƒHÚÚ  Ú.à0 àÛ€HÛõÿÿÿÿd>ßb$Large Circleððà0 àÝ ƒ¥¿!ÝÓ  ÓÔ€õƒ5õõõÔÔ€ôƒ5õõõƒ5ÔÓ °°-°œXÓÔ  ÔÑ  ÑÝ  Ý›ÓC€  e'#CÓÑX°ÑÖ€ ÿÿÖñ×ññÛñ¢Ö€ ÿÿÖ£ñÛññÛñÖ€$ÿÿÖñÛññ×ññ×ñÖ€ÿÿÖñ×ñÑX°ÑÓ  ÓÓr^°°Ü4` Œ ¸ ä <h”ÀìDpœÈô Lx¤Ð ü!(#T$€%¬&°°-rÓÑ  ÑÔ% € ÔÔ€'ô]Šõõôƒ5Ôà@HHìàò òòò€Command€Line€Arguments€&€Environment€Variablesóóó óˆÐ „ Ðà@ššìàò òòòñÕñProposal€„€Iterative€ModelñÕññÖñTechnical€SpecificationñÖñóóó óˆÐ ´0 ÐÌà@ZZ"ìàby€Craig€T.€DedoˆÌà@RR"ìàFebruary€1,€1998ˆÌÌà Ü àThis€paper€is€the€fourth€draft€of€the€proposal€to€add€command€line€arguments€and€environmentÏvariables€to€Fortran€2000.ñÚñ€€This€paper€is€essentially€a€reprint€of€paper€97-201.ñÚñ€€This€revision€includesÏthe€following€changes:ÌÝ‚>ßbÿÝÝ  ÝÝ‚>ßbGÝððà0 Ü àÝ  ÝDespite€severe€time€constraints,€I€made€an€attempt€to€correct€factual€errors€in€paper€97-201.݃>ßbGb݌И Ü(#Ü(# ÐŒÝ  Ýððà0 Ü àà0Ü(#Ü(#àà Ü àHonoring€the€straw€vote€at€Meeting€141,€the€Everything„at„Once€model€has€been€dropped€in€favorÐ ä`  Ðof€the€Iterative€model.€€Consequently,€there€are€now€five€(5)€intrinsic€procedures€in€place€of€theÏprevious€two€(2)€intrinsic€procedures.Ð (#(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àAn€optional€NAME€argument€has€been€added€to€all€procedures€in€order€to€obtain€or€specify€theÐ <¸  Ðnames€of€command€arguments€in€situations€where€the€operating€system€or€environmentÏspecifies€names€for€certain€command€arguments.Ð (#(# Ðððà0 Ü àAll€of€the€procedures€have€¢ISO£_€as€a€prefix.Д Ü(#Ü(# Ðððà0 Ü àThis€edition€does€not€include€examples€or€normative€text€edits.Ð\Ø Ü(#Ü(# ÐÌò ò1.à0 Ü àRationaleó óÐìhÜ(#Ü(# Ðà Ü àGetting€command€line€arguments€and€environmental€variables€is€€obviously€desirable€since€it€hasÏbeen€implemented€in€a€vendor-specific€manner€€on€a€wide€variety€of€machines€and€a€wide€variety€ofÏcompilers.€€This€€capability€is€already€part€of€the€standard€functionality€for€C€and€C++.ÌÌà Ü àThis€feature€allows€application€developers€a€way€of€passing€€information€to€their€program€right€atÏstartup.€€Such€information€can€be€very€€valuable€in€configuring€the€program€before€passing€control€overÏto€users€or€€in€performing€other€important€tasks€such€as€opening€documents€and€files.€€€ThisÏrequirement€requires€direct€access€to€the€operating€system.€€Right€now,€€these€capabilities€are€beyondÏthe€current€definition€of€the€Fortran€language.€€ÌÌà Ü àSimilarly,€providing€a€means€for€an€executing€program€to€obtain€the€€program's€startup€commandÏwill€allow€the€program€to€use€this€information€in€€order€to€find€related€files€that€it€needs€or€for€otherÏpurposes.ÌÌà Ü àThe€basic€functionality€for€command€line€arguments€is€common€among€€implementations.€€However,Ïthere€is€no€de-facto€standard€means€to€specify€it.€€Section€4€of€this€paper€contains€a€list€of€someÏvendor-specific€implementations.ÌÌà Ü àSome€systems€also€offer€environmental€variables,€process-defined€€symbols,€process-defined€logicalÏnames,€or€system-defined€logical€names.€€€Some€of€this€functionality€could€be€incorporated€by€anÏintrinsic€which€€returns€a€processor-defined€result€when€passed€a€character€variable.€ÌÌà Ü àNot€all€environments€have€a€command€line€to€return.€€However,€an€€implementation€should€returnÏa€status€field€and€one€status€can€be€that€there€€is€no€processor-defined€command€line€to€return.€€ByÏanalogy,€the€€¢DATE_AND_TIME£€intrinsic€is€provided€even€though€some€systems€do€not€have€€real-timeÏclocks.ÌÌà Ü àAlthough€it€is€highly€likely€that€windowing€operating€systems€will€dominate€the€computers€of€theÏfuture,€it€is€unlikely€that€the€need€for€this€feature€will€go€away.€€Most€windowing€operating€systemsÏalready€have€a€means€of€providing€command€line€arguments€and/or€environmental€variables€atÏprogram€startup.ÌÐ ð.l(3 Ðà Ü àIt€is€the€intent€of€this€proposal€to€provide€the€same€functionality€which€is€currently€available€in€CÏand€C++€compilers.€€Desirable€features€include:ÌÌððà0 Ü àà ° àà0ÜÜ(#Ü(#àA€user€interface€which€is€easily€understood,€easy€to€use,€and€which€has€the€look-and-feel€of€Fortran.ÐÜXÜ(#Ü(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àA€user€interface€which€allows€the€programmer€to€exercise€a€high€degree€of€control.€€TheÐ l è Ðprogrammer€can€select€those€capabilities€which€are€necessary€or€desirable€at€a€given€point€inÏa€program€while€being€able€to€ignore€those€capabilities€which€are€not€needed.Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àAbility€to€adapt€to€the€likely€consequences€of€the€ISO/SC22€mandate€for€internationalization.ÐŒ  (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àParallel€syntax€between€the€command€line€and€environment€variables.И (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àAbility€to€treat€the€command€line€as€either€a€string€or€as€a€series€of€arguments.€€This€is€similar€toÐ ¬(  Ðthe€DATE/TIME€vs€VALUES€option€in€the€DATE_AND_TIME€subroutine.Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àAutomatic€parsing€of€the€command€line€based€on€operating€system€defined€or€processor€definedÐ €  Ðdelimiters.€€Many€users€want€this€feature€without€the€bother€of€doing€the€grunt€workÏthemselves.Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àAllowing€for€systems€which€can€only€return€the€command€line€tail€vs€systems€which€can€return€theÐ $  Ðfull€command€line.Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àAbility€to€provide€an€error€status€including€the€fact€that€no€command€line€can€be€provided€or€theÐ |ø Ðspecified€environmental€variable€does€not€exist.Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àAbility€to€adhere,€to€the€greatest€extent€possible,€to€the€rules,€conventions,€and€expectations€of€theÐ ÔP Ðhost€operating€system.Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àAbility€to€provide€this€functionality€in€a€variety€of€operating€environments€in€as€portable€a€way€asÐ ,¨ Ðpossible€using€the€same€syntax.€€This€includes€differences€in€operating€systems,€commandÏargument€delimiters,€and€graphical€user€interfaces€(GUIs).Ð (#(# ÐÌÌò ò2.à0 Ü àTechnical€Specificationó óÐ!"Ü(#Ü(# Ðà Ü àThis€proposal€adds€five€(5)€separate€intrinsic€procedures€with€parallel€syntax:Ìððà0 Ü àà0Ü(#Ü(#àà Ü àThe€subroutine€ISO_NCOMMAND_ARGUMENTS€obtains€the€number€of€command€arguments.Ш"$$(#(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àThe€subroutine€ISO_GET_COMMAND_ARGUMENT€obtains€a€specified€command€argument.Ðp#ì%(#(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àThe€subroutine€ISO_GET_UNPARSED_COMMAND€obtains€the€unparsed€command€line€tail,€i.e.,Ð 8$´& Ðeverything€in€the€command€line€except€for€the€program€name.Ð (#(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àThe€subroutine€ISO_GET_PROGRAM_NAME€obtains€the€file€name€of€the€program€which€isÐ È%D( Ðexecuting.Ð (#(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àThe€subroutine€ISO_GET_ENVIRONMENT€obtains€information€from€the€program's€environment.ÐX'Ô *(#(# ÐÌà Ü àMost€of€the€arguments€€of€these€five€(5)€procedures€are€of€type€CHARACTER.€€Any€mismatchÏbetween€the€length€of€the€argument€and€its€associated€value€is€resolved€according€to€the€usual€rulesÏfor€CHARACTER€assignment,€i.e.,€the€CHARACTER€value€is€truncated€or€blank€filled€on€the€right€asÏnecessary.€€If€the€KIND€type€or€character€set€of€the€target€variable€cannot€represent€the€assigned€value,Ïan€error€occurs.ÌÌà Ü àAn€ò òoperating€system€ó óis€the€master€control€program€for€a€computing€system.€€The€operatingÐ ˜-'2 Ðsystem€manages€and€allocates€hardware€and€software€resources,€schedules€and€controls€the€executionÐ d.à'3 Ðof€other€programs,€performs€input€and€output€to€and€from€all€devices,€sets€the€standards€for€applicationÏprograms€which€run€on€it,€defines€the€permissible€user€interfaces,€and€provides€a€set€of€functions€andÏsubroutines€which€application€programs€can€call€for€use€of€operating€system€resources.ÌÌà Ü àA€program's€ò òcommand€lineó ó€includes€information€which€is€associated€with€the€program€at€startup,Ð ¤  Ðaccording€to€the€rules€and€conventions€of€the€program's€operating€system€and€environment.€€ThisÏinformation€includes,€but€is€not€limited€to,€character€strings€included€with€the€program's€startupÏcommand.ÌÌà Ü àA€program's€ò òcommand€line€tailó ó€includes€everything€in€the€command€line€except€for€the€programÐ    Ðname.€€ÌñÔñßa€1,-` 0  `€E°*xˆd´° è$ VaßñÔññÔñßq€1,)U9)%l 0  `€€€E°*xtt è$ Öqßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âñÔñà Ü àCommand€line€arguments€appear€with€the€command€which€starts€the€program€and€are€separatedÏfrom€each€other€by€delimiters.€€The€processor€shall€use€the€operating€system€definition€of€commandÏargument€delimiters€and€assignment€of€positional€order€of€command€line€arguments€if€such€a€definitionÏis€available.€€If€the€operating€system€definition€is€not€available,€the€definition€of€command€argumentÏdelimiters€and€assignment€of€positional€order€for€command€line€arguments€is€processor€dependent.ÌÌñÓñßa€10-` 0  `€E°Mxˆd´° èL QaßñÓññÓñßq€10)U9)%l 0  `€€€E°Mxtt èL Ñqßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âñÓñà Ü àPositional€ordering€numbers€start€with€1€and€continue€consecutively€up€to€the€maximum€numberÏof€command€line€arguments.€€If€present,€the€program€name€is€not€included€in€the€numbering€ofÏcommand€line€arguments.ÌÌÌà Ü àISO_NCOMMAND_ARGUMENTS€(N,€ISTATUS)€obtains€the€number€of€command€line€arguments.€ÏÌà Ü àN€is€a€scalar€of€type€INTEGER.€€It€is€an€INTENT€(OUT)€argument.€€It€specifies€the€number€ofÏcommand€line€arguments.ÌÌà Ü àISTATUS€(optional)€is€a€scalar€of€type€INTEGER.€€It€is€an€INTENT€(OUT)€argument.€€On€returnÏfrom€the€subroutine,€ISTATUS€is€assigned€the€operating€system€completion€status€if€it€is€available.€ÏOtherwise,€the€value€of€ISTATUS€is€processor€dependent.ÌÌÌà Ü àISO_GET_COMMAND_ARGUMENT€(€N,€VALUE,€LENGTH,€NAME,€ISTATUS€)€obtains€theÏspecified€command€argument.€ÌÌà Ü àN€is€a€scalar€of€type€INTEGER.€€It€is€an€INTENT€(IN)€argument.€€It€specifies€the€positional€numberÏof€the€command€line€argument.ÌÐ d.à'3 Ðà Ü àVALUE€is€an€assumed„length€scalar€of€type€CHARACTER.€€It€is€an€INTENT€(OUT)€argument.€€ItÏis€assigned€the€value€of€the€command€line€argument€specified€by€N.€€ÌÌà Ü àLENGTH€(optional)€is€a€scalar€of€type€INTEGER.€€It€is€an€INTENT€(OUT)€argument.€€It€is€assignedÏthe€length€of€the€significant€portion€of€the€command€line€argument€specified€by€N.€€Whether€the€lengthÏreported€LENGTH€is€longer€than€the€last€non-blank€character€of€the€specified€command€line€argumentÏis€processor€dependent.ÌÌñÒñßa€17-` 0  `€E°Ë xød´°èÄ  ÇaßñÒññÒñßq€17)U9)%l 0  `€€€E°Ë xxttèÄ  Gqßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âñÒñà Ü àNAME€(optional)€is€an€assumed„length€scalar€of€type€CHARACTER.€€It€is€an€INTENT€(OUT)Ïargument.€€It€is€assigned€the€name€of€the€command€line€argument.€€If€the€name€of€the€command€lineÏargument€is€not€available,€it€is€assigned€all€blanks.ÌÌà Ü àISTATUS€(optional)€is€a€scalar€of€type€INTEGER.€€It€is€an€INTENT€(OUT)€argument.€€On€returnÏfrom€the€subroutine,€ISTATUS€is€assigned€the€operating€system€completion€status€if€it€is€available.€ÏOtherwise,€the€value€of€ISTATUS€is€processor€dependent.ÌÌÌà Ü àISO_GET_UNPARSED_COMMAND€(VALUE,€LENGTH,€NAME,€ISTATUS)€obtains€the€commandÏline€tail.ÌÌà Ü àVALUE€is€an€assumed„length€scalar€of€type€CHARACTER.€€It€is€an€INTENT€(OUT)€argument.€€ItÏis€assigned€the€value€of€the€command€line€tail.€€If€there€is€no€command€line€or€command€line€tail,€it€isÏassigned€all€blanks.ÌÌñÑñßa€1-` 0  `€E°-x¨d´°@è, qaßñÑññÑñßq€1)U9)%l 0  `€€€E°-x(tt@è, ñqßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âñÑñà Ü àLENGTH€(optional)€is€a€scalar€of€type€INTEGER.€€It€is€an€INTENT€(OUT)€argument.€€It€is€assignedÏthe€length€of€the€significant€portion€of€the€unparsed€command€line€tail.€€Whether€the€length€reportedÏLENGTH€is€longer€than€the€last€non-blank€character€of€the€unparsed€command€line€tail€is€processorÏdependent.ÌÌñÐñßa€1:-` 0  `€E°³)xød´°è¬) ÇaßñÐññÐñßq€1:)U9)%l 0  `€€€E°³)xxttè¬) Gqßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â ââ °±°±°±°±âÐ Ì,H&1°±°± ÐñÐñà Ü àNAME€(optional)€is€an€assumed„length€scalar€of€type€CHARACTER.€€It€is€an€INTENT€(OUT)Ïargument.€€It€is€assigned€the€name€of€the€command€line€tail.€€If€the€name€of€the€command€line€tail€isÏnot€available,€it€is€assigned€all€blanks.Ìâ âÌà Ü àISTATUS€(optional)€is€a€scalar€of€type€INTEGER.€€It€is€an€INTENT€(OUT)€argument.€€On€returnÏfrom€the€subroutine,€ISTATUS€is€assigned€the€operating€system€completion€status€if€it€is€available.€ÏOtherwise,€the€value€of€ISTATUS€is€processor€dependent.ÌÌà Ü àISO_GET_PROGRAM_NAME€(VALUE,€LENGTH,€NAME,€ISTATUS)€obtains€the€fully„qualifiedÏprogram€name.€€ÌÌà Ü àVALUE€is€an€assumed„length€scalar€of€type€CHARACTER.€€It€is€an€INTENT€(OUT)€argument.€€ItÏis€assigned€the€file€name€of€the€program€which€is€executing.€€The€value€of€VALUE€is€the€same€valueÏwhich€would€be€returned€by€executing€an€INQUIRE€(FILE=program„name,€NAME=VALUE)€statementÏon€the€program's€file€name€(represented€by€program-name).€€If€the€program€name€is€not€available,€theÏreturn€value€of€VALUE€is€all€blanks.ÌÌà Ü àLENGTH€(optional)€is€a€scalar€of€type€INTEGER.€€It€is€an€INTENT€(OUT)€argument.€€It€is€assignedÏthe€length€of€the€significant€portion€of€the€program€name.€€Whether€the€length€reported€by€LENGTHÏis€longer€than€the€last€non-blank€character€of€the€program€name€is€processor€dependent.ÌÌßq€1)U9)%l 0  `€€€E°óxxttèì Gqßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âà Ü àNAME€(optional)€is€an€assumed„length€scalar€of€type€CHARACTER.€€It€is€an€INTENT€(OUT)Ïargument.€€It€is€assigned€the€name€of€the€command€line€argument.€€If€the€name€of€the€program€nameÏargument€is€not€available,€it€is€assigned€all€blanks.ÌÌà Ü àISTATUS€(optional)€is€a€scalar€of€type€INTEGER.€€It€is€an€INTENT€(OUT)€argument.€€On€returnÏfrom€the€subroutine,€ISTATUS€is€assigned€the€operating€system€completion€status€if€it€is€available.€ÏOtherwise,€the€value€of€ISTATUS€is€processor€dependent.ÌÌÌà Ü àISO_GET_ENVIRONMENT€(€NAME,€INAME_LENGTH,€VALUE,€IVALUE_LENGTH,€ISTATUS)Ïobtains€the€value€of€the€named€environment€variable.ÌÌà Ü àNAME€is€a€scalar€of€type€CHARACTER.€€It€is€an€INTENT€(IN)€argument.€€It€contains€the€name€ofÏthe€environment€variable€for€which€the€value€is€required.ÌÌà Ü àINAME_LENGTH€(optional)€is€a€scalar€of€type€INTEGER.€€It€is€an€INTENT(IN)€argument.€€It€isÏassigned€the€length€of€the€significant€portion€of€the€NAME€argument.ÌÌà Ü àVALUE€is€a€scalar€of€type€CHARACTER.€€It€is€an€INTENT€(OUT)€argument.€€It€is€assigned€theÏvalue€of€the€environment€variable€which€is€contained€in€NAME.€€ÌÌà Ü àIVALUE_LENGTH€is€an€optional€scalar€of€type€INTEGER.€€It€is€an€INTENT(OUT)€argument.€€ItÏcontains€the€length€of€the€significant€portion€of€the€VALUE€argument.Ìâ âÐ Ì,H&1 Ðà Ü àISTATUS€is€an€optional€scalar€of€type€INTEGER.€€It€is€an€INTENT€(OUT)€argument.€€On€returnÏfrom€the€subroutine,€ISTATUS€is€assigned€the€operating€system€completion€status€if€it€is€available.€ÏOtherwise,€the€value€of€ISTATUS€is€processor€dependent.Ìâ âßq€1.)U9)%l 0  `€€€E°âxtt èÜ Öqßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âÌò ò3.à0 Ü àProposed€Edits€to€be€Operated€on€Lateró óИ Ü(#Ü(# Ðà Ü àThese€edits€are€preliminary€and€are€provided€primarily€as€a€basis€for€discussion.€€They€are€withÏrespect€to€the€Fortran€95€Committee€Draft,€X3J3€/€96-007r1.ÌÌ[The€normative€edits€to€Chapter€13€will€appear€in€a€future€edition€of€this€paper.]ÌÌAdd€the€following€terms€to€the€Glossary:Ìò òcommand€line€:ó óà Œ àInformation€which€is€associated€with€the€program€at€startup,€according€to€the€rulesÐ ˜ Ðand€conventions€of€the€program's€operating€system€and€environment.€€This€information€includes,€butÏis€not€limited€to,€character€strings€included€with€the€program's€startup€command.ÌÌò òcommand€line€tail€:ó óà0 ¸ àEverything€in€the€command€line€except€for€the€program€name.м8¸ (#¸ (# ÐÌò òoperating€system€:ó óà ¸ àThe€master€control€program€for€a€computing€system.€€The€operating€systemÐ PÌ Ðmanages€and€allocates€hardware€and€software€resources,€schedules€and€controls€the€execution€of€otherÏprograms,€performs€input€and€output€to€and€from€all€devices,€sets€the€standards€for€applicationÏprograms€which€run€on€it,€defines€the€permissible€user€interfaces,€and€provides€a€set€of€functions€andÏsubroutines€which€application€programs€can€call€for€use€of€operating€system€resources.ÌÌ[End€of€Proposed€Edits]ÌÌò ò4.à Ü àSummary€of€Vendor-Specific€Implementationsó óÐ ”  Ðà Ü àHere€is€a€summary€of€some€vendor-specific€implementations.€€This€information€is€adapted€fromÏmaterial€prepared€by€David€Mattoon€as€part€of€X3J3€JOR€Item€016.ÌÌà Ü àDigital€Fortran€(formerly€DEC€Fortran€and€VAX€Fortran)€for€OpenVMS€requires€that€the€programÏbe€invoked€as€a€"foreign€command."€Subroutine€LIB$GET_FOREIGN€(COMMAND_LINE,€PROMPT,ÏCOMMAND_LEN,€FLAGS)€is€called€where€COMMAND_LINE€returns€the€command€line€tail,€PROMPTÏdisplays€a€prompt€for€the€user€to€supply€a€command€line€tail€interactively,€COMMAND_LEN€optionallyÏreturns€the€length€of€the€command€line€tail,€and€FLAGS€is€an€argument€for€a€"utility€commandÏcollector"€not€needed€for€this€application.ÌÌà Ü àIBM€AIX/6000:€GETARG(I,€C)€is€a€subroutine€where€I€specifies€which€command€line€argument€toÏreturn€(0=program€name),€C€is€an€argument€of€type€character€and€will€contain,€upon€return€fromÏGETARG,€the€command€line€argument.€€Subroutine€GETENV€('ENVNAM',€RESULT)€stores€inÏcharacter€variable€RESULT€the€value€of€the€environmental€variable€ENVNAM€in€the€profile€file€of€theÏcurrent€directory.ÌÌà Ü àHP€has€a€function€IARGC()€which€returns€the€number€of€arguments€and€a€subroutine€GETARGÏ(THSARG,€ARG)€which€returns€the€THSARG-th€argument€from€the€built-in€ARG€array.ÌÐ p.ì'3 Ðà Ü àLahey€Fortran:€Subroutine€GETCL€returns€a€string€containing€the€command€tail;€everything€afterÏthe€command€and€the€blank€separator.ÌÌà Ü àMicrosoft€Fortran:à ¸ àNARGS()is€a€function€which€returns€the€number€of€arguments.€€GETARGÐ ÜX Ð(THSARG,€ARGMNT,€STATUS)€is€a€subroutine€where€THSARG€specifies€which€command€lineÏargument€is€desired€(0=program€name),€ARGMNT€is€the€actual€command€line€argument,€and€STATUSÏis€a€status:€if€<€0,€an€error€occurred.€€If€>€0,€it€is€the€length€of€the€command€line€argument€returnedÌÌà Ü àPOSIX:€€Several€vendors€have€implemented€the€IEEE€POSIX€1003.9€binding€to€FORTRAN€77.€ÏFunction€IPXFARGC€obtains€the€number€of€command€arguments.€€Subroutine€PXFGETARG€(N,€ARG,ÏARGLEN,€IERROR)€gets€the€list€of€command€line€arguments.€€PXFGETARG()€places€the€NthÏcommand-line€argument€in€the€character€string€ARG.€€The€significant€length€of€ARG€is€returned€inÏARGLEN.€€The€standard€also€goes€on€to€define€some€error€conditions€(argument-too-long€andÏN-out-of-range),€as€well€as€the€numbering€of€arguments€(0€is€the€command/verb,€1€is€the€first€argument,Ïetc).€€Subroutines€PXFGETENV€and€PXFSETENV€respectively€get€and€set€environment€variables.€ÏSubroutine€PXFCLEARENV€clears€all€environment€variables.ÌÌÌò ò5.à0 Ü àHistoryó óДÜ(#Ü(# ÐÌòòMeeting€141€„€May€1997óóÐ (¤ ÐStraw€Vote:à0 ` àWhich€model€do€you€prefer?Ððl` (#` (# ÐàЀ€ Üà4ˆà0  àEverything„at„Once€(something€similar€to€97-151)и4(#(# ÐàÐ$$ Üà14ˆà0  àIterative€(something€similar€to€97-153)Ѐü(#(# ÐàЀ€ Üà0ˆà0  àSomething€elseÐHÄ(#(# ÐàЀ€ Üà1ˆà0  àUndecidedÐŒ(#(# ÐÌà0 Ü àà ° àDedo,€Craig.€€¢J3£/97¢-151r1£,€Command€Line€Arguments€&€Environment€Variables€„€Everything-at-OnceÏModel.€€This€was€a€revision€of€paper€J3€/€97„110€and€included€the€following€changes:Ð Ü(#Ü(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àThe€use€of€blanks€to€separate€command€line€arguments€has€been€dropped€in€favor€of€usingÐ 0¬ Ðcommand€argument€delimiters€defined€by€the€host€operating€system.€€In€case€the€host€operatingÏsystem€does€not€define€command€argument€delimiters,€the€definition€of€such€delimiters€isÏprocessor€dependent.€€Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àThe€language€regarding€the€source€of€command€arguments€has€been€€generalized€so€as€not€to€stateÐ !”" Ðor€imply€that€such€arguments€must€physically€follow€the€program€name.€€In€addition,Ïexplanatory€text€has€been€added€so€as€to€clarify€that€this€feature€is€applicable€to€theÏconventions€which€are€used€with€certain€Graphical€User€Interfaces€(GUIs).Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àSeveral€notes€have€been€added€to€explain€why€features€were€defined€in€€a€certain€way,€the€practicalÐ %|' Ðconsequences€of€how€certain€features€are€defined,€and€to€answer€questions€raised€by€the€generalÏpublic.Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àThe€subroutine€¢GET_COMMAND_LINE£€has€another€argument,€€¢IARGUMENT_LENGTHS£,€whichÐ  (œ!+ Ðreports€the€length€of€each€command€line€argument.€€This€allows€for€the€subroutine€to€report€theÏusage€of€significant€trailing€€blanks€on€those€operating€systems€which€support€such€a€feature.Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àThe€subroutine€¢GET_ENVIRONMENT£€has€two€additional€arguments:€€INAME_LENGTH€forÐ @+¼$/ Ðspecifying€the€length€of€the€NAME€argument€and€IVALUE_LENGTH€for€specifying€the€lengthÏof€the€VALUE€argument.Ð (#(# Ðâ âÐ ˜-'2 Ðððà0 Ü àà0Ü(#Ü(#àà Ü àThere€are€additions€to€the€glossary€for€the€terms€"command€line",€"command€line€tail",€andÐ „ Ðâ â"operating€system".Ð (#(# ÐÌDedo,€Craig.€€J3/97-152,€Command€Line€Arguments€&€Environment€Variables€„€Questions€&€Answers.ÌÌà0 Ü àà ° àMaine,€Richard.€€J3/97-153,€Proposed€Specs€and€Syntax€for€System€Arguments.€€This€paper€proposedÏthe€iterative€model€and€was€prepared€as€a€counter„proposal€to€the€model€proposed€in€paperÏ¢J3£/97¢-151r1£.Ð Ü(#Ü(# ÐÌDedo,€Craig.€€J3/97-163,€Command€Line€Arguments€&€Environment€Variables€„€Ideas€for€Straw€Votes.ÌÌòòMeeting€140€(Combined€J3/WG5)€„€February€1997óóÐ ˜  ÐVotes€„€Add€Command€Line€Arguments€to€list€of€Fortran€2000€RequirementsÌà0 Ü àStraw€Vote€(Subgroup):à0Ü(#Ü(#àà0<(#(#àYes€„€9à0”<(#<(#àà0À”(#”(#àà0ìÀ(#À(#àNo€„€3Ь( ì(#ì(# Ðà0 Ü àStraw€Vote€(Full€Committee):à0<Ü(#Ü(#àYes€„€29à0À<(#<(#àà0ìÀ(#À(#àNo€„€4Ðtð ì(#ì(# Ðà0 Ü àStraw€Vote:€What€Priorityà0Ü(#Ü(#àà0<(#(#àA€„€6à0”<(#<(#àà0À”(#”(#àà0ìÀ(#À(#àB€„€15à0Dì(#ì(#àà0pD(#D(#àC€„€12Ð<¸ p(#p(# Ðà0 Ü àStraw€Vote:€What€Priorityà0Ü(#Ü(#àà0<(#(#àà0h<(#<(#àà0”h(#h(#àà0À”(#”(#àà0ìÀ(#À(#àB€„€19à0Dì(#ì(#àà0pD(#D(#àC€„€13Ѐ p(#p(# Ðà0 Ü àà0Ü(#Ü(#àà Ü àIncluded€in€Additional€Minor€Technical€Enhancements€list€in€paper€¢J3£/97¢-138r1£€(¢WG5£-¢N1259£),ÏContent€of€Fortran€2000Ð (#(# ÐÌDedo,€Craig.€€¢J3£/97-110€(¢WG5£-¢N1242£),€Command€Line€Arguments€and€Environment€Variables.ÌÌÌò ò6.à0 Ü àReferencesó óÐ|øÜ(#Ü(# Ðà0 Ü àà ° àFreedman,€Alan.€€1995.€€Computer€Glossary:€€The€Complete€Illustrated€Dictionary,€7th€ed.€€New€York,ÏNY:€€American€Management€Association.€€p.€281.Ð Ü(#Ü(# ÐÌà0 Ü àà ° àInstitute€of€Electrical€and€Electronics€Engineers€(IEEE).€€1992.€€IEEE€Standard€1003.9-1992€-€IEEEÏStandard€for€Information€Technology€-€POSIX€FORTRAN€77€Language€Interfaces€-€Part€1:€€BindingÏfor€System€Application€Interface€(API).€€Ð Ü(#Ü(# ÐÌà0 Ü àà ° àInternational€Business€Machines€Corporation.€€December€1993.€€AIX/XL€Fortran€Compiler/6000ÏLanguage€Reference€Version€3€Release€1.€€North€York,€ON:€€International€Business€MachinesÏCorporation.€€pp.€401,€441.Ð Ü(#Ü(# ÐÌà0 Ü àà ° àLahey€Computer€Systems.€€1995.€€Fortran€90€Language€Reference€Revision€B.€€Incline€Village,€NV:€ÏLahey€Computer€Systems.€€pp.€131,€263.Ð Ü(#Ü(# ÐÌà0 Ü àà ° àX3J3€/€96¢-004r1£,€¢X3J3£€Journal€of€Requirements,€Items€016,€040,€and€041.Ð Ü(#Ü(# ÐÌà0 Ü àà ° àJ3€/€97-195,€Command€Line€Arguments€&€Environmental€Variables€-€Questions€&€Answers.Ð Ü(#Ü(# ÐÌ[End€of€J3€/€œ98-1ñßñ15ñßññÞñaañÞñ]›