ÿWPC;J ZÇŸ‹Èò].WÅÎ;D]F¬¥áí{UFß.ÿjˆѯŒS'V@ê¨jDƒt>Á3nbYT; MÙ±tÙÉÕ qÏw.‹¡ò\¡Ù1ð=Õòí5gœË[gDǶ eÌGžb€,Žo2wð$sš¡”EéÀ­?©Ó…ãÚ*1_ üóÅX|~p'ô$gaå«”ø¿¥mxå’žÁ/â``¾¿Üóq"m" wN ×ëv970*5ƒKÜþ' Â?qÓ;ƵMåY&öRhÆá!0`ž~ð÷v“ÕrœÁèÆ÷ƒdwDEôÙ+Î4ÁϤ­+-êºv%<… >7û$\î5HŸ5›k<[–ê; ±X¯3aÏbGB®Y‹ùƒSœ-â.Òb•NõöcÊ“È ³:_SÈ<†a¬m¿ᎂWɸЂé¯XùæMîò¾ž“­xšêÀÝT1xT3—Ÿg‹‚áád]@Á½g‹©ã6>çä;ðϘ”ÝY׊ÐÒLûªÎ{ P{´¯‹7\6œÔ÷¡Šû{÷ÕËf1œóF>‚cÇaš WöÕÄ•Øã•HƉ%ØÏš6·‰"ânÍö^Ž006JH¼ã•¯¢Â¸ ø¥ì–„9¤ VU'P´ % 0§  0±Ls¿nÇÆÊ e e‘ 0eö T[¯ 0Ã?  0eXmw@Å45(] m_ 1mvãêÿUPé 1m9 ¦ Œ® Z:"UP”$UPä$ø4%UP,(UP|(UPÌ(Ù)óõ* 0Ãè1 D3«2 BÞ2 0Ãû2´¾3¶r6´(9UPÜ;Ú,< AS>ÆY> 0D? D/c? B’?Ù¯?aˆAUPéCéCéCéCéCéCéCéCéCéCéCéCéCéCÆ9D 0sÿDÆrE 0‡8F8F8F8F8F¿FJ×H×H×H×H×H×H C!J«gQ¨Z8NewCenturySchlbk Regularõ(¥¿$¡¡Ó  ÓÔ€ô@D õ õôÔÔ€ô@D õ õô@DÔÓ °°-°œXÓÔ  ÔÑ  Ñ(š2_µ$§§Ý ƒ¥¿!ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œ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 [Ý ƒ_µ'ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›Ó °°§,°°-Óà€hh>(#àÔ‡»»õôþ‡Ôò ò¢J3£€/€97¢-151r1£Ô#†ôþ‡õ»»¿#Ôó óˆÐ X ТNCITS£€¢J3£€ANSI€Fortran€Standards€Committeeà€ìì>(#àCraig€T.€DedoˆÐ x  ÐCommand€Line€Arguments€&€Environment€Variablesà€˜˜:(#àFebruary€25,€1997ˆÐ Dì ÐEverything„at„Once€Modelà€|||(#àPage€Ú  Ú1Ú  Ú€of€Ú  Ú10Ú  Ú4#(¾2Quick A.ÚƒÚÚ  Ú.à0 àÛ€Û˜c:\COREL\OFFICE7\TEMPLATE\X3J3DO~1.WPT †Ó °°§,°œXÓòòÔ.@ƒ 0C:\X3J3\141\97-151r1.wpd@ÔC:\X3J3\141\97-151r1.wpdÔ/  Ôóó(›3m¼$©©Ý ƒ¥¿!ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÑ  ÑÝ  ÝH4#:.2Quick 1.ÚƒFÚÚ  Ú.à0 àÛ€FÛc:\Corel\Office7\Template\X3J3 Document.wpt gDhDiUjkDlmUnoDpòˆ˜"Ðó„3|xq +Ý ƒ+m¼"ÝÓ  ÓÔ€!õþ‡õõõÔÔ€!ôþ‡õõ!õþ‡ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇ$ôþ‡õõ!ôþ‡Ôò òExampleó óÐ  ÐAssume€that€the€operating€system's€status€code€for€"success"€is€1,€the€executing€program's€file€isÏ$1$¢DKA100£:[¢DEVELOPMENT.EXAMPLES]DEMO.EXE;15£,€and€the€program€has€the€followingÏcommand€line€tail:Ìà - à/LIST€€"Here€comes€Fortran€2000!"€€EXPERIMENT:[¢FORTRAN_2000]TESTFILE.TXT£ÌThe€operating€system's€parsing€rules€consider€blanks€to€be€delimiters,€except€within€a€characterÏcontext,€i.e.€a€character€string€delimited€by€double€quotes.€€If€successful,€the€referenceÏ¢GET_COMMAND_LINE£€(€¢NARGUMENTS£=N,€¢STARTUP_COMMAND£=S,Ï¢COMMAND_LINE£=C,€¢COMMAND_ARGUMENTS£=A,€¢IARGUMENT_LENGTHS£=L,Ï¢ISTATUS£=I€)€assigns€the€following€values€to€the€arguments:ÌArgumentà ‡ àà ´ àValueÐ üü  ÐNà - àà Z àà ‡ àà ´ àà á à3Ð ÈÈ  ÐSà - àà Z àà ‡ à$1$¢DKA100£:[¢DEVELOPMENT.EXAMPLES]DEMO.EXE;15£Ð ” ”  ÐCà - àà Z àà ‡ àÔ‡$Âÿº Âõ$ôþ‡Ô/LIST€€"Here€comes€Fortran€2000!"€€EXPERIMENT:[¢FORTRAN_2000]TESTFILE.TXT£Ô#†$ôþ‡õ Â$Âÿº~#ÔÐ ` `  ÐA(1)à Z àà ‡ àà ´ à/LISTÐ , ,  ÐA(2)à Z àà ‡ àà ´ àHere€comes€Fortran€2000!Ð ø ø  ÐA(3)à Z àà ‡ àà ´ àEXPERIMENT:[¢FORTRAN_2000]TESTFILE.TXT£Ð Ä Ä  ÐL(1)à Z àà ‡ àà ´ à5Ð   ÐL(2)à Z àà ‡ àà ´ à24Ð \\ ÐL(3)à Z àà ‡ àà ´ à37Ð (( ÐIà - àà Z àà ‡ àà0 ´ à1Ô#†!ôþ‡õõ$ôþ‡#Ô ÿU‹ÿÀÀÀ' e37=CIQYag³³1.a.i.(1)(a)(i)1)a) Ý ƒ+m¼"ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇôþ‡õõôþ‡ÔCommand€argument€delimiters€are€defined€in€this€way€in€order€to€allow€the€processor€theÐ  Ðmaximum€amount€of€flexibility€to€implement€delimiters€as€may€be€required€by€the€host€operatingÏsystem.€€There€also€is€flexibility€for€the€processor€to€define€delimiters€in€case€the€operatingÏsystem€does€not€do€so.Ô#†ôþ‡õõôþ‡#ÔCommand Line Arguments & Environment Variables - Everything-at-Once Model Í-$Craig T. Dedo$0Craig T. Dedo$J3 / 97-151r1œ.Command Line Arguments & Environment Variables - Everything-at-Once Model" 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 «gQ¨Z8NewCenturySchlbk Regular# e37=CIQYag­­1.a.i.(1)(a)(i)1)a)  ‚Ý ƒ+m¼"ÝÓ  ÓÔ€%õþ‡õõõÔÔ€%ôþ‡õõ%õþ‡ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇôþ‡õõ%ôþ‡Ô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.Ô#†%ôþ‡õõôþ‡#Ô PÝ ƒ+m¼"ÝÓ  ÓÔ€ õþ‡õõõÔÔ€ ôþ‡õõ õþ‡ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇôþ‡õõ ôþ‡Ô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.Ô#† ôþ‡õõôþ‡#Ô«gQ¨Z8NewCenturySchlbk Regular«gQ¨Z8NewCenturySchlbk Regular îÝ ƒ+m¼"ÝÓ  ÓÔ€#õþ‡õõõÔÔ€#ôþ‡õõ#õþ‡ÔÓ °°-°œXÓÔ  ÔÝ  ݛԇôþ‡õõ#ôþ‡Ô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€¢COMMAND_ARGUMENTS£Ïand,€at€the€same€time,€return€all€blanks€in€¢COMMAND_LINE£.€€It€also€would€be€standardÏconforming€for€a€processor€in€such€situations€to€return€the€concatenation€of€all€of€theÏ¢COMMAND_ARGUMENTS£€values€as€the€return€value€of€¢COMMAND_LINE£.Ô#†#ôþ‡õõôþ‡#Ô«gQ¨Z8NewCenturySchlbk Regular«gQ¨Z8NewCenturySchlbk Regular«gQ¨Z8NewCenturySchlbk Regular ÏÝ ƒ+m¼"ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›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. éÝ ƒ+m¼"ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›ò òExampleó óÐ  ÐAssume€that€the€operating€system's€status€code€for€"success"€is€1,€the€executing€program's€file€isÏ$1$¢DKA100£:[¢DEVELOPMENT.EXAMPLES]DEMO.EXE;15£,€and€the€program€has€the€followingÏcommand€line€tail:Ìà - à/LIST€€"Here€comes€Fortran€2000!"€€EXPERIMENT:[¢FORTRAN_2000]TESTFILE.TXT£ÌThe€operating€system's€parsing€rules€consider€blanks€to€be€delimiters,€except€within€a€characterÏcontext,€i.e.€a€character€string€delimited€by€double€quotes.€€If€successful,€the€referenceÏ¢GET_COMMAND_LINE£€(€¢NARGUMENTS£=N,€¢STARTUP_COMMAND£=S,Ï¢COMMAND_LINE£=C,€¢COMMAND_ARGUMENTS£=A,€¢IARGUMENT_LENGTHS£=L,Ï¢ISTATUS£=I€)€assigns€the€following€values€to€the€arguments:ÌArgumentà ‡ àà ´ àValueÐ üü  ÐNà - àà Z àà ‡ àà ´ àà á à3Ð ÈÈ  ÐSà - àà Z àà ‡ à$1$¢DKA100£:[¢DEVELOPMENT.EXAMPLES]DEMO.EXE;15£Ð ” ”  ÐCà - àà Z àà ‡ àÔ‡Âÿº Âõôþ‡Ô/LIST€€"Here€comes€Fortran€2000!"€€EXPERIMENT:[¢FORTRAN_2000]TESTFILE.TXT£Ô#†ôþ‡õ ÂÂÿº_#ÔÐ ` `  ÐA(1)à Z àà ‡ àà ´ à/LISTÐ , ,  ÐA(2)à Z àà ‡ àà ´ àHere€comes€Fortran€2000!Ð ø ø  ÐA(3)à Z àà ‡ àà ´ àEXPERIMENT:[¢FORTRAN_2000]TESTFILE.TXT£Ð Ä Ä  ÐL(1)à Z àà ‡ àà ´ à5Ð   ÐL(2)à Z àà ‡ àà ´ à24Ð \\ ÐL(3)à Z àà ‡ àà ´ à37Ð (( ÐIà - àà Z àà ‡ àà0 ´ à1(›3m¼$££Ý ƒ¥¿!ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÑ  ÑÝ  Ý****'ÿÿdxd d(›3m¼$¢¢Ý ƒ¥¿!ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÑ  ÑÝ  Ý ªÝ ƒ+m¼"ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›ò òExampleó óÐ  ÐAssume€that€the€operating€system's€status€code€for€"success"€is€0,€the€value€of€the€PATHÏenvironment€variable€is€"C:\¢WINNT40;C£:\¢WINNT40£\¢SYSTEM32;D£:\",€and€the€value€of€E€isÏPATH.€€If€successful,€the€reference€¢GET_ENVIRONMENT£€(€NAME=E,€VALUE=V,€¢ISTATUS£=I)Ïassigns€the€following€values€to€the€argumentsÌArgumentà ‡ àà ´ àValueÐ  ÐVà - àà Z àà ‡ àC:\¢WINNT40;C£:\¢WINNT40£\¢SYSTEM32;D£:\Ð ÌÌ ÐIà - àà Z àà ‡ à0 ¬Ý ƒ+m¼"ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›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€¢COMMAND_ARGUMENTS£Ïand,€at€the€same€time,€return€all€blanks€in€¢COMMAND_LINE£.€€It€also€would€be€standardÏconforming€for€a€processor€in€such€situations€to€return€the€concatenation€of€all€of€theÏ¢COMMAND_ARGUMENTS£€values€as€the€return€value€of€¢COMMAND_LINE£. ªÝ ƒ+m¼"ÝÓ  ÓÔ€/õþ‡õõõÔÔ€/ôþ‡õõ/õþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›ò òExampleó óÐ  ÐAssume€that€the€operating€system's€status€code€for€"success"€is€0,€the€value€of€the€PATHÏenvironment€variable€is€"C:\¢WINNT40;C£:\¢WINNT40£\¢SYSTEM32;D£:\",€and€the€value€of€E€isÏPATH.€€If€successful,€the€reference€¢GET_ENVIRONMENT£€(€NAME=E,€VALUE=V,€¢ISTATUS£=I)Ïassigns€the€following€values€to€the€argumentsÌArgumentà ‡ àà ´ àValueÐ  ÐVà - àà Z àà ‡ àC:\¢WINNT40;C£:\¢WINNT40£\¢SYSTEM32;D£:\Ð ÌÌ ÐIà - àà Z àà ‡ à0«gQ¨Z8NewCenturySchlbk Regular ÐÝ ƒ+m¼"ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›Command€argument€delimiters€are€defined€in€this€way€in€order€to€allow€the€processor€theÐ  Ðmaximum€amount€of€flexibility€to€implement€delimiters€as€may€be€required€by€the€host€operatingÏsystem.€€There€also€is€flexibility€for€the€processor€to€define€delimiters€in€case€the€operatingÏsystem€does€not€do€so.2+(3)UCþÿ <<CÿÿƒLevel 1Level 2Level 3Level 4Level 5($$””ò òÚ  Ú1Ú  Úó ó55'÷ÿ dxdüÿP Pd ÏÝ ƒ+m¼"ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›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. WÝ ƒ_µ'ÝÓ  ÓÔ€8õþ‡õõõÔÔ€8ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›Ó °°§,°°-Óà€dd@(#àÔ‡8»»õôþ‡Ôò ò¢J3£€/€97-151Ô#†8ôþ‡õ»»¿#Ôó óˆÐ X ТNCITS£€¢J3£€ANSI€Fortran€Standards€Committeeà€ìì>(#àCraig€T.€DedoˆÐ x  ÐCommand€Line€Arguments€&€Environment€Variablesà€˜˜:(#àFebruary€25,€1997ˆÐ Dì ÐEverything„at„Once€Modelà€|||(#àPage€Ú  Ú1Ú  Ú€of€Ú  Ú10Ú  Ú«gQ¨Z8NewCenturySchlbk Regular1, 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Û Ý ƒ+m¼"ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›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. @Ý ƒ+m¼"ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÝ  Ý›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.õÿÿÿÿdÝ ƒ¥¿!ÝÓ  ÓÔ€õþ‡õõõÔÔ€ôþ‡õõõþ‡ÔÓ °°-°œXÓÔ  ÔÑ  ÑÝ  Ý›ÓC€  e'#CÓÑX°ÑÖ€ ÿÿÖñpñ¢Ö€ ÿÿÖ£ñpññpñÖ€7ÿÿÖñpñÑX°ÑÓ  ÓÓr^°°Ü4` Œ ¸ ä <h”ÀìDpœÈô Lx¤Ð ü!(#T$€%¬&°°-rÓÑ  ÑÔ% € Ôà@HHìàò òòò€Command€Line€Arguments€&€Environment€Variablesóóó óˆÐ ¤ Ðà@ŽŽìàò òòòEverything„at„Once€Modelóóó óˆÐ Ü8 ÐÌà@ZZ"ìàby€Craig€T.€DedoˆÌà@$$"ìàFebruary€25,€1997ˆÌÌà Ü àThis€paper€is€the€second€draft€of€the€proposal€to€add€command€line€arguments€and€environmentÏvariables€to€Fortran€2000.€€This€revision€includes€the€following€changes:ÌÌððà0 Ü àà0Ü(#Ü(#àà Ü àThe€use€of€blanks€to€separate€command€line€arguments€has€been€dropped€in€favor€of€usingÐ hÄ  Ð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Ð dÀ  Ð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.Ð (#(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àThere€are€additions€to€the€glossary€for€the€terms€"command€line",€"command€line€tail",€andÐ ðL Ð"operating€system".Ð (#(# ÐÌÌò ò1.à0 Ü àRationaleó óÐ #|#Ü(#Ü(# Ðà Ü à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.ÌÐ L.¨'1 Ðà Ü à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.ÌÌà Ü àIt€is€the€intent€of€this€paper€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.Ð`¼Ü(#Ü(# ÐÌððà0 Ü àà0Ü(#Ü(#àà Ü àA€user€interface€which€allows€the€programmer€to€exercise€a€high€degree€of€control.€€TheÐ øT Ð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Ü(#Ü(#àà Ü à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Ð T#°$ Ð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€provide€this€functionality€in€a€variety€of€operating€environments€in€as€portable€a€way€asÐ (x!* Ðpossible€using€the€same€syntax.€€This€includes€differences€in€operating€systems,€commandÏargument€delimiters,€and€graphical€user€interfaces€(¢GUIs£).Ð (#(# ÐÌò ò2.à0 Ü àTechnical€Specificationó óÐL+¨$.Ü(#Ü(# Ðà Ü àThis€proposal€adds€two€separate€intrinsic€subroutines€with€parallel€syntax.€€This€proposal€assumesÏthat€the€Allocatable€Extensions€TR€will€become€part€of€Fortran€2000€in€substantially€its€current€form.Ìâ âÐ ´-'1 Ðà Ü à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.ÌÌà Ü àThe€subroutine€¢GET_COMMAND_LINE£€obtains€information€from€the€program's€command€line.€ÏThis€information€includes:Ìððà0 Ü àà0Ü(#Ü(#àà Ü àThe€number€of€command€line€arguments,Ð8 ”(#(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àThe€file€name€of€the€program€which€is€executing,Ð `(#(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àThe€command€line€tail,€i.e.€everything€in€the€command€line€except€for€the€program€name,ÐÐ , (#(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àAutomatic€parsing€of€the€command€line€tail€into€individual€command€line€arguments,€Ðœø (#(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àThe€length€of€each€command€line€argument,€andÐhÄ (#(# Ðððà0 Ü àà0Ü(#Ü(#àà Ü àReturn€of€the€subroutine's€completion€status.Ð4 (#(# ÐÌà Ü àThe€subroutine€¢GET_ENVIRONMENT£€obtains€information€from€the€program's€environment.ÌÌà Ü àMost€of€the€arguments€€of€these€two€subroutines€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.ÌÌà Ü à¢GET_COMMAND_LINE£€(€¢NARGUMENTS£,€¢STARTUP_COMMAND£,€¢COMMAND_LINE£,Ï¢COMMAND_ARGUMENTS£,€¢IARGUMENT_LENGTHS£,€¢ISTATUS£€)€obtains€command€line€argumentsÏand€related€information.€€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€if€such€a€definition€is€available.€€If€the€operating€systemÏdefinition€is€not€available,€the€definition€of€command€argument€delimiters€is€processor€dependent.ÌÌßa€1-` 0  `€E°Áxtt0èÀ áaßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âà Ü àAll€six€arguments€are€optional€and€are€INTENT€(OUT).ÌÌà Ü à¢NARGUMENTS£€is€a€scalar€of€type€INTEGER€of€any€kind€that€is€defined€on€the€processor.€€It€isÏassigned€the€number€of€command€line€arguments€which€are€supplied€to€the€program.€€If€there€is€noÏcommand€line€or€command€line€arguments,€it€is€assigned€the€value€zero€(0).ÌÌà Ü à¢STARTUP_COMMAND£€is€a€scalar€of€type€CHARACTER€of€any€kind€that€is€defined€on€theÏprocessor.€€It€is€assigned€the€file€name€of€the€program€which€is€executing.€€The€value€ofÏ¢STARTUP_COMMAND£€is€the€same€value€which€would€be€returned€by€executing€an€INQUIREÏ(FILE=file-name-¢expr£€)€statement€on€the€program's€file€name.€ÌÌà Ü à¢COMMAND_LINE£€is€a€scalar€of€type€CHARACTER€of€any€kind€that€is€defined€on€the€processor.€ÏIt€is€assigned€the€value€of€the€command€line€tail,€i.e.€everything€in€the€command€line€except€for€theÏâ âprogram€name.€€If€there€is€no€command€line€or€command€line€tail,€it€is€assigned€all€blanks.Ð °- '1 Ðâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±ââ âßa€1-` 0  `€E°¥xtt0è¤ áaßñgñÌñgñ³à Ü à¢COMMAND_ARGUMENTS£€is€a€rank€one€allocatable€array€of€type€CHARACTER€of€any€kind€whichÏis€defined€on€the€processor.€€Each€array€element€is€assigned€the€respective€argument€of€the€commandÏline,€in€the€order€in€which€the€argument€appears€on€the€command€line.€€If€the€operating€system€orÏcontext€does€define€a€specific€order,€the€order€for€the€command€line€arguments€is€processor€dependent.€ÏEach€command€line€argument€is€separated€from€the€other€arguments€by€delimiters.€€IfÏ¢COMMAND_ARGUMENTS£€is€not€allocated€at€the€time€of€a€call€to€¢GET_COMMAND_LINE£,€it€isÏallocated€with€a€dimension€of€¢NARGUMENTS£,€and€each€element€has€the€length€of€the€longestÏargument.€€If€there€is€no€command€line€or€command€line€tail€and€¢COMMAND_ARGUMENTS£€is€notÏalready€allocated,€¢COMMAND_ARGUMENTS£€has€a€dimension€of€one€and€is€assigned€all€blanks.ÌÌßa€1"-` 0  `€E°ýx°ttÈèü yaßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âÌà Ü à¢IARGUMENT_LENGTHS£€is€a€rank€one€allocatable€array€of€type€INTEGER€of€any€kind€which€isÏdefined€on€the€processor.€€Each€array€element€is€assigned€the€length€of€the€respective€command€lineÏargument€in€the€same€element€position€in€¢COMMAND_ARGUMENTS£.€€Whether€the€length€reportedÏin€an€element€of€¢IARGUMENT_LENGTHS£€is€longer€than€the€last€non-blank€character€of€theÏcorresponding€element€of€¢COMMAND_ARGUMENTS£€is€processor€dependent.ÌÌßa€1-` 0  `€E°Ã!x€tt˜è¼! Oaßâ °±°±°(#°(#âñhñÌñhñ°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âà Ü à¢ISTATUS£€is€a€scalar€of€type€INTEGER€of€any€kind€that€is€defined€on€the€processor.€€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.Ìâ âÐ (x!* Тâ °±°±°(#°(#ââ â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âßa€1-` 0  `€E°¥x¨ttÀè¤ qaߣÌà Ü à¢GET_ENVIRONMENT£€(€NAME,€¢INAME_LENGTH£,€VALUE,€¢IVALUE_LENGTH£,€¢ISTATUS£)Ïobtains€the€value€of€the€named€environment€variable.ÌÌà Ü àNAME€is€a€scalar€of€type€CHARACTER€of€any€kind€that€is€defined€on€the€processor.€€It€is€anÏINTENT€(IN)€argument.€€It€contains€the€name€of€the€environment€variable€for€which€the€value€isÏrequired.ÌÌà Ü à¢INAME_LENGTH£€is€an€optional€scalar€of€type€INTEGER€of€any€kind€that€is€defined€on€theÏprocessor.€€It€is€an€INTENT(IN)€argument.€€It€contains€the€length€of€the€significant€portion€of€theÏNAME€argument.ÌÌà Ü àVALUE€is€a€scalar€of€type€CHARACTER€of€any€kind€that€is€defined€on€the€processor.€€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€of€any€kind€that€is€defined€on€theÏprocessor.€€It€is€an€INTENT(OUT)€argument.€€It€contains€the€length€of€the€significant€portion€of€theÏVALUE€argument.ÌÌà Ü à¢ISTATUS£€is€an€optional€scalar€of€type€INTEGER€of€any€kind€that€is€defined€on€the€processor.€€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.Ð L+¨$. Ðâ °±°±°(#°(#ââ â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âßa€1&-` 0  `€E°ªxtt0è¤ æaßÌÌ¢ßa€1.-` 0  `€E°Ó xLttdèÐ  aßâ °±°±°(#°(#⣰â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âÌò ò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£.ÌÌAdd€the€following:Ìò òÓ  Ó¢13.14.38a£à 4 àà ` à¢GET_COMMAND_LINE£€(€[¢NARGUMENTS£,€¢STARTUP_COMMAND£,Ð `¼ ТCOMMAND_LINE£,€¢COMMAND_ARGUMENTS£,€¢IARGUMENT_LENGTHS£,€¢ISTATUS£]€)ó óÐ 0Œ ÐÓ‡BÓÌò òDescription.ó óà ` àObtains€the€command€line€and€related€information€from€the€operating€system.€€TheÐ Ì( Ð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.€€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Ïif€it€is€available.€€If€the€operating€system€definition€is€not€available,€the€definition€of€command€argumentÏdelimiters€is€processor€dependent.ÌÌßa€10-` 0  `€E°%xtt0èü$ åaßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âÌò òClass.ó óà  àSubroutine.Ð \+¸$. ÐÌò òArguments.ó óÐ ø,T&0 Ðâ â¢NARGUMENTS£€(optional)Ð È-$'1 Ðà0 Ü àà0Ü(#Ü(#àà04(#(#àà0` 4(#4(#àà0Œ ` (#` (#àà0¸ Œ (#Œ (#àshall€be€scalar€and€of€type€INTEGER€of€any€kind€that€is€defined€on€theÏâ âprocessor.€€It€is€an€INTENT€(OUT)€argument.€€It€is€assigned€the€number€ofÏcommand€line€arguments€which€appear€with€the€command€which€starts€theÏprogram.€€If€there€is€no€command€line€or€command€line€arguments,€it€isÏassigned€the€value€zero€(0).Ð ¸ (#¸ (# ÐÌ¢STARTUP_COMMAND£€(optional)Ìà0 Ü àà0Ü(#Ü(#àà04(#(#àà0` 4(#4(#àà0Œ ` (#` (#àà0¸ Œ (#Œ (#àshall€be€scalar€and€of€type€CHARACTER€of€any€kind€that€is€defined€on€theÏprocessor.€It€is€an€INTENT€(OUT)€argument.€€It€is€assigned€the€file€name€of€theÏprogram€which€is€executing.€€The€value€of€¢STARTUP_COMMAND£€is€the€sameÏvalue€which€would€be€returned€by€executing€an€INQUIREÏ(FILE=file-name-¢expr£€)€statement€on€the€program's€file€name.€Ð ¸ (#¸ (# ÐÌ¢COMMAND_LINE£€(optional)Ìà0 Ü àà0Ü(#Ü(#àà04(#(#àà0` 4(#4(#àà0Œ ` (#` (#àà0¸ Œ (#Œ (#àshall€be€scalar€of€type€CHARACTER€of€any€kind€that€is€defined€on€theÏprocessor.€€It€is€an€INTENT€(OUT)€argument.€€It€is€assigned€the€value€of€theÏcommand€line€tail,€i.e.€everything€in€the€command€line€except€for€the€programÏname.€€If€there€is€no€command€line€or€command€line€tail,€it€is€assigned€allÏblanks.ñfñÐ ¸ (#¸ (# ÐñfñÌßa€1N-` 0  `€E°•xtt0è” áaßâ °±°±°(#°(#âœñeññcñÌñcñÌ¢ñeñ›¢°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âCOMMAND_ARGUMENTS£ñeñ£ñeñ€(optional)Ìà0 Ü àà0Ü(#Ü(#àà04(#(#àà0` 4(#4(#àà0Œ ` (#` (#àà0¸ Œ (#Œ (#àshall€be€a€rank€one€allocatable€array€of€type€CHARACTER€of€any€kind€whichÏis€defined€on€the€processor.€€It€is€an€INTENT€(OUT)€argument.€€Each€arrayÏelement€is€assigned€the€respective€argument€of€the€command€line,€in€the€orderÏin€which€the€argument€appears€on€the€command€line.€€If€the€operating€systemÏor€context€does€define€a€specific€order,€the€order€for€the€command€lineÏarguments€is€processor€dependent.€€Each€command€line€argument€is€separatedÏfrom€the€other€arguments€by€delimiters.€€If€¢COMMAND_ARGUMENTS£€is€notÏallocated€at€the€time€of€a€call€to€¢GET_COMMAND_LINE£,€it€is€allocated€with€aÏdimension€of€¢NARGUMENTS£,€and€each€element€has€the€length€of€the€longestÏargument.€€If€there€is€no€command€line€or€command€line€tail€andÏ¢COMMAND_ARGUMENTS£€is€not€already€allocated,Ï¢COMMAND_ARGUMENTS£€has€a€dimension€of€one€and€is€assigned€all€blanks.Ð ¸ (#¸ (# ÐÌ¢ßa€1--` 0  `€E°T'x°ttÈèP' | aߣâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âÐ |.Ø'2 Ї¢IARGUMENT_LENGTHS£€(optional)Ìà0 Ü àà0Ü(#Ü(#àà04(#(#àà0` 4(#4(#àà0Œ ` (#` (#àà0¸ Œ (#Œ (#àshall€be€a€rank€one€allocatable€array€of€type€INTEGER€of€any€kind€that€isÏdefined€on€the€processor.€€It€is€an€INTENT€(OUT)€argument.€Each€arrayÏelement€is€assigned€the€length€of€the€corresponding€element€ofÏ¢COMMAND_ARGUMENTS£.€€Whether€the€length€reported€in€an€element€ofÏ¢IARGUMENT_LENGTHS£€is€longer€than€the€last€non-blank€character€of€theÏcorresponding€element€of€¢COMMAND_ARGUMENTS£€is€processor€dependent.Ð ¸ (#¸ (# ÐñiñÌñiññjñßa€1O-` 0  `€E° x€tt˜è  O aßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âñjññkñÌ¢ñkñ¢ISTATUS£ñkñ£ñkñ€(optional)Ìà0 Ü àà0Ü(#Ü(#àà04(#(#àà0` 4(#4(#àà0Œ ` (#` (#àà0¸ Œ (#Œ (#àshall€be€scalar€of€type€INTEGER€of€any€kind€that€is€defined€on€the€processor.€ÏIt€is€an€INTENT€(OUT)€argument.€€On€return€from€the€subroutine,€¢ISTATUS£Ïis€assigned€the€operating€system€completion€status€if€it€is€available.€€Otherwise,Ï¢ISTATUS£€is€assigned€a€processor-dependent€value.Ð ¸ (#¸ (# ÐñmñÌñmññmññlñ¢ñlññmññlñßa€1'-` 0  `€E°Éx¨ttÀèÈ q aßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âñlñÌÌò òÓ  Ó¢13.14.38b£à 4 àà ` à¢GET_ENVIRONMENT£€(€NAME€[,€¢INAME_LENGTH£],€VALUEÐ €*Ü#- Ð[,¢IVALUE_LENGTH£]€[,€¢ISTATUS£]€)ó óÐ P+¬$. ÐÓ[]ÓÌò òDescription.ó óà ` àObtains€the€value€of€a€named€environment€variable.Ð ì,H&0 ÐÌò òClass.ó óà  àSubroutine.Ð ˆ.ä'2 Їò òArguments.ó óÐ ¤ ÐNAMEà0  àà04(#(#àà0` 4(#4(#àà0Œ ` (#` (#àà0¸ Œ (#Œ (#àshall€be€a€scalar€of€type€CHARACTER€of€any€kind€that€is€defined€on€theÐ tÐ Ðprocessor.€€It€is€an€INTENT€(IN)€argument.€It€contains€the€name€of€theÏenvironment€variable€for€which€the€value€is€required.€€If€the€¢INAME_LENGTH£Ïargument€is€not€present,€the€significant€length€is€the€same€length€as€would€beÏreturned€by€the€¢LEN_TRIM£€intrinsic.Ð ¸ (#¸ (# ÐÌ¢INAME_LENGTH£€(optional)Ìà0 Ü àà0Ü(#Ü(#àà04(#(#àà0` 4(#4(#àà0Œ ` (#` (#àà0¸ Œ (#Œ (#àshall€be€a€scalar€of€type€INTEGER€of€any€kind€that€is€defined€on€the€processor.€ÏIt€is€an€INTENT(IN)€argument.€€It€contains€the€length€of€the€significant€portionÏof€the€NAME€argument.Ð ¸ (#¸ (# ÐÌVALUEà0 4 àà0` 4(#4(#àà0Œ ` (#` (#àà0¸ Œ (#Œ (#àshall€be€a€scalar€of€type€CHARACTER€of€any€kind€that€is€defined€on€theÐ 8”  Ðprocessor.€€It€is€an€INTENT€(OUT)€argument.€It€is€assigned€the€value€of€theÏenvironment€variable€which€is€contained€in€NAME.€€Ð ¸ (#¸ (# ÐÌ¢IVALUE_LENGTH£€(optional)Ìà0 Ü àà0Ü(#Ü(#àà04(#(#àà0` 4(#4(#àà0Œ ` (#` (#àà0¸ Œ (#Œ (#àshall€be€a€scalar€of€type€INTEGER€of€any€kind€that€is€defined€on€the€processor.€ÏIt€is€an€INTENT(OUT)€argument.€€It€contains€the€length€of€the€significantÏportion€of€the€VALUE€argument.Ð ¸ (#¸ (# ÐÌ¢ISTATUS£€(optional)à0 ¸ àshall€be€a€scalar€of€type€INTEGER€of€any€kind€that€is€defined€on€the€processor.€Ð dÀ ÐIt€is€an€INTENT€(OUT)€argument.€€On€return€from€the€subroutine,€¢ISTATUS£Ïis€assigned€the€operating€system€completion€status€if€it€is€available.€€Otherwise,Ï¢ISTATUS£€is€assigned€a€processor-dependent€value.Ð ¸ (#¸ (# ÐÌßa€16- ` 0  `€E°fxtt0è` æ aßâ °±°±°(#°(#âñnñ°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âßa€1,-` 0  `€E°÷ xLttdè÷   aßâ °±°±°(#°(#â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °±°±°±°±â°â °(#°(#°±°±âñnññoñÌÌñoñ[End€of€Proposed€Subroutines]ÌÌAdd€the€following€terms€to€the€Glossary:Ìò òcommand€line€:ó óà Œ àInformation€which€is€associated€with€the€program€at€startup,€according€to€the€rulesÐ ,x%/ Ð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.ÌÐ „.à'2 Ðò òcommand€line€tail€:ó óà0 ¸ àEverything€in€the€command€line€except€for€the€program€name.Ф¸ (#¸ (# ÐÌò òoperating€system€:ó óà ¸ àThe€master€control€program€for€a€computing€system.€€The€operating€systemÐ @œ Ð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.ÌÌà Ü à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 Ü àReferencesó óÐð,L&0Ü(#Ü(# Ðà0 Ü àà ° àFreedman,€Alan.€€1995.€€Computer€Glossary:€€The€Complete€Illustrated€Dictionary,€7th€ed.€€New€York,ÏNY:€€American€Management€Association.€€p.€281.ÐŒ.è'2Ü(#Ü(# Їà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-152,€Command€Line€Arguments€œñ]ñ&ñ]ññ^ñ&ñ^ñ›€Environmental€Variables€-€Questions€&€Answers.Ð Ü(#Ü(# ÐÌ[End€of€¢J3£€/€97-151]