Changeset 283


Ignore:
Timestamp:
05/31/10 09:55:13 (14 years ago)
Author:
mmaipsl
Message:

MM, PC: suppress leading zeros in some mathematical operations to

protect them against ksh octal cast.

File:
1 edited

Legend:

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

    r148 r283  
    7272 
    7373    IGCM_debug_PopStack "IGCM_date_HumanDigit" 
     74} 
     75 
     76#================================================================== 
     77function IGCM_date_SupressZeros 
     78{ 
     79    IGCM_debug_PushStack "IGCM_date_SupressZeros" $@ 
     80    echo $( print ${1} | sed -e "s/0*//" ) 
     81    IGCM_debug_PopStack "IGCM_date_SupressZeros" 
    7482} 
    7583 
     
    387395        read dt 
    388396    else 
    389         dt=$1 
     397        dt=$( IGCM_date_SupressZeros $1 ) 
    390398    fi 
    391399 
Note: See TracChangeset for help on using the changeset viewer.