WPC <_HM^J :- ѓcJkss{on4ڐe$\`q`F< \w*k|p8P[ƙfy)h_NBULdw)Ek39 R,11Yc+t-<|/s"W~jX9k=+_TV w,W;(yɖ&Z5td+e bVf^IѹSDN͚\‹uj;\(Vꚢ|㰏c+r*dC ⱗÿBXǖCXm346A}Gݺ dA鹮,j襏'+IԸ³oBLsWQH |dY22 ?n?쭏*WKZd'}cUKۨ\CٻL6PV̂rZLfp+4$LOZaθЩҽ9TeaߎE^D3@`Vz9rUL< % 0 0: L M nU ULX e  UV7 0 1mf   w@4ULK 1mZULULUV_q7   0   D3 B B%%%%%%%% AOBBB 0DW D/ C2p`4New Century Schoolbook(\\$XXXX    (2v$ \\!XX      d:\office\wpwin\template\x3j3-rpt.wpt<6X9`(CourierXx6X@KX@<6X9`(Courierd6X@K@+`4New Century Schoolbooke P'CP+`4New Century Schoolbook  v'     ,X>(### X3J3/96-056# ###Ԉ X X3J3ANSIFortranStandardsCommittee>(#CraigT.Dedo L SYSTEM_CLOCKFixup:(#February19,1996  (#Page  1  ڀof29LXp>New Century Schoolbook BoldSYSTEM_CLOCK FixupReport,' ' X3J3/96-056$Craig T. Dedo$Craig T. Dedo .   /4 Fortran 2000 Standard+None     "1 302Original   ,X.> .D:\X3J3\X3J3\96-056.WPD>D:\X3J3\X3J3\96-056.WPD/  (3$ \\!XX      # e37=CIQYag1.a.i.(1)(a)(i)1)a)Level 1Level 2Level 3Level 4Level 5H LEMNEOPQRESTXpi d8dT8\2p`4New Century Schoolbook3|xX' e37=CIQYag1.a.i.(1)(a)(i)1)a)2p`4New Century Schoolbook+`4New Century Schoolbook9LXp>New Century Schoolbook Bold 0 X Example. Assumethattheprocessorclockisa24hourclockthatregisterstimeat  1,193,180/65,536orapproximately18.20648193tickspersecond.At11:30A.M.thereference XX  X   CALLSYSTEM_CLOCK(COUNT=C,COUNT_RATE=R,COUNT_MAX=N)0 X setsC=(11*3600+30*60)*18.20648193=753748;R=18.20648193; XX  X andM=24*3600*18.206481931=1573039Level 1Level 2Level 3Level 4Level 5Level 1Level 2Level 3Level 4Level 5Level 1Level 2Level 3Level 4Level 5 (3$ \\!XX      ,,,,'dxd dP Pd<)>?C<< CLevel 1Level 2Level 3Level 4Level 5($$   1  11' dxdd \\!XX      ݛC  e'#C  r^4` <hDp Lx !(#T$%&Xr@ ! SYSTEM_CLOCKFixup I  @SS"byCraigT.Dedo@"February19,1996## 1.  Rationale  )    Currently,theFortranstandardrequiresthatallthreeargumentstotheSYSTEM_CLOCKintrinsicsubroutinebeoftypedefaultINTEGER.WhiletheINTEGERdatatypeisacceptableforCOUNTandCOUNT_MAX,itcausesseriousaccuracyproblemsfortheCOUNT_RATEargument.ϜThisismostlikelyanerrorintheexistingstandardwhichshouldbecorrected.Thiserrorunnecessarilyrestrictstheavailableprecision.  Theprocessorclocksofmanymachines,mostnotablytheclocksofIntel80x86PCs,havesignificantfractionalcomponentsintheirclockrates.OnIntel(MS-DOSPC)machines,theclockticksapproximately18.20648193(1,193,180/65,536)timespersecond(NortonandWilton1988,143145)(Norton,Aitken,andWilton1993,174-178).RequiringCOUNT_RATEtobeINTEGERcausesconsiderablelossofaccuracyforsuchmachines.  Interpretation132attemptedtoresolvethisproblembutitisatbestabarelytolerablequickfix.Ascurrentlydefined,interpretation132posessevereportabilityproblems,evenfromonecompilertoanotheronthesamemachine.IntheIntelcase,theinterpretationallowedallthreeofthesepractices:  2 e  1  .3  0  IncrementCOUNTby1every0.05495secondsbutreturnaCOUNT_RATEof18.P(#(#   2 e  2  .3  0  IncrementCOUNTby10every0.05495secondsandreturnaCOUNT_RATEof182.P(#(#   2 e  3  .3  0  IncrementCOUNTbyavariableamountevery0.05495secondsandreturnaCOUNT_RATE  of100. (#(#   Allthreeofthesepracticesare,atbest,counterintuitiveandnotthebehavioranordinaryprogrammerwouldexpect.Atworst,theyaredownrightdeceptive.MostprogrammersexpectCOUNT_RATEtobeaverycloseapproximationtotheactualsystemclockcountrate.  OneofthemostattractivefeaturesofFortranisthatitisgenerallyintuitiveandstraightforward.Therearerelativelyfewtrapsand"gotchas"whichcauseproblemsforprogrammerswhohavelessthanexpertlevelofability.Thisisinsharpcontrasttoalmostallotherpopularlanguages.InordertoencouragethecontinuedpopularityofFortran,X3J3shouldeliminatesuchproblemswheneverpossible. 2.  TechnicalDescription  R $   ThisproposalextendsthefunctionalityoftheSYSTEM_CLOCKsubroutinesothatitcanacceptnondefaultkindsofintegersinallthreeargumentsandcanacceptagenericrealargumentforϜCOUNT_RATE.  Thisproposalprovidesanoptionalscalingfeatureforprocessorswithveryhighclockrates.Theauthorchoseacutoffrateof20,000tickspersecondbecausethisisthehighestroundvaluethatisT% " TpossibleforaclockratewithoutQcausingCOUNT_MAXtoQexceedRingRthemaximumSvalueSfora4bytesignedintegerina24hourperiod.(NoteLKLKLM:2,147,483,648/86MNM4MNO,400=24,855.13)OTP%  PT 3.  EditstotheStandard  /(!/   TheseeditsarewithrespecttotheFortran95CommitteeDraft,X3J3/96-007r0.[266:1940]Replacesection13.14.106withthefollowing: 13.14.106 4 SYSTEM_CLOCK([COUNT][,COUNT_RATE][,COUNT_MAX])  +y%4   Description.  Returnsnumericdatafromarealtimeclock. 0-&6 М̛  Class.  4 Subroutine .U(8 Ї&    Arguments.  I   COUNT(optional)0 shallbescalarandoftypesignedintegerofanykindthatiscapableof n representingthevalueofCOUNT_MAX.ItisanINTENT(OUT)argument.Itissettoa'IgprocessordependentvaluebasedonthecurrentvalueoftheprocessorclockortoHUGE(0)ifthereisnoclock.TheprocessordependentvalueisincrementedbyoneforeachclockcountuntilthevalueCOUNT_MAXisreachedandisresettozeroatthenextcount.Itliesintherange0toCOUNT_MAXifthereisaclock.  (# (#   COUNT_RATE(optional)     4  `  0 shallbescalarandoftypeintegerorrealofanykindthatisdefinedontheprocessor.ItisanINTENT(OUT)argument.Itissettoaprocessordependentapproximationtothenumberofprocessorclockcountspersecond,ortozeroifthereisnoclock.  (# (#   COUNT_MAX(optional)     4  `  0 shallbescalarandoftypesignedintegerofanykindthatiscapableofrepresentingthevalueofCOUNT_MAX.ItisanINTENT(OUT)argument.Itissettothenumberofclockticksina24hour(86400second)periodortozeroifthereisnoclock.ThisargumentisthemaximumvaluethatCOUNTcanhave.  (# (# Constraint:0 ` Aprocessorwithanactualclockrategreaterthan20,000tickspersecondmay q optionallyreportaresultforCOUNT_RATEthatisscaledbyanintegerscalefactorsuchthatCOUNT_RATErepo