Changeset 723


Ignore:
Timestamp:
10/17/12 13:03:08 (12 years ago)
Author:
sdipsl
Message:
  • reduce some variables scope. No side effect observed up to now. Luckily.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/libIGCM/libIGCM_date/libIGCM_date.ksh

    r722 r723  
    4444  IGCM_debug_PushStack "IGCM_date_YearDigit" $@ 
    4545 
     46  typeset NUM 
     47 
    4648  NUM=$(( 10#${1} )) 
    4749  echo $( gawk "BEGIN { printf \"%0${dY}d\",${NUM} }" ) 
     
    5456{ 
    5557  IGCM_debug_PushStack "IGCM_date_GregorianDigit" $@ 
     58 
     59  typeset NUM 
    5660 
    5761  NUM=$(( 10#${1} )) 
     
    377381  # Use IGCM_date_DaysInYear to get the number of days in the year and return a value 
    378382  # accordingly. 
     383 
    379384  IGCM_date_DaysInYear $y diy 
    380385  case $diy in 
     
    639644    IGCM_debug_Exit "IGCM_date_DaysBetweenJulianDate" 
    640645  fi 
     646 
     647  typeset jul1 jul2 yyyy1 yyyy2 ddd1 ddd2 res 
    641648 
    642649  # This process subtracts arg2 from arg1. If arg2 is larger 
     
    684691  esac 
    685692 
    686  
    687693  # if argument 2 was larger than argument 1 then 
    688694  # the arguments were reversed before calculating 
     
    728734    IGCM_debug_Exit "IGCM_date_DaysBetweenGregorianDate" 
    729735  fi 
     736 
     737  typeset grg1 grg2 jul1 jul2 res 
    730738 
    731739  # convert each date to julian 
     
    834842function IGCM_date_DaysInPreviousPeriod { 
    835843  IGCM_debug_PushStack "IGCM_date_DaysInPreviousPeriod" $@ 
    836   typeset Length Period 
     844 
     845  typeset Length Period year0 year month i 
     846 
    837847  Period=${2} 
    838848  case ${Period} in 
     
    896906function IGCM_date_DaysInNextPeriod { 
    897907  IGCM_debug_PushStack "IGCM_date_DaysInNextPeriod" $@ 
    898   typeset Length Period 
     908 
     909  typeset Length Period year0 year month i 
     910 
    899911  Period=${2} 
    900912  case ${Period} in 
     
    953965function IGCM_date_DaysInCurrentPeriod { 
    954966  IGCM_debug_PushStack "IGCM_date_DaysInCurrentPeriod" $@ 
    955   typeset Length Period  
     967 
     968  typeset Length Period year0 year month i 
     969 
    956970  Period=${2} 
    957971  case ${Period} in 
Note: See TracChangeset for help on using the changeset viewer.