* +-======-+ * Copyright (c) 2003-2018 United States Government as represented by * the Admistrator of the National Aeronautics and Space Administration. * All Rights Reserved. * * THIS OPEN SOURCE AGREEMENT ("AGREEMENT") DEFINES THE RIGHTS OF USE, * REPRODUCTION, DISTRIBUTION, MODIFICATION AND REDISTRIBUTION OF CERTAIN * COMPUTER SOFTWARE ORIGINALLY RELEASED BY THE UNITED STATES GOVERNMENT AS * REPRESENTED BY THE GOVERNMENT AGENCY LISTED BELOW ("GOVERNMENT AGENCY"). * THE UNITED STATES GOVERNMENT, AS REPRESENTED BY GOVERNMENT AGENCY, IS AN * INTENDED THIRD-PARTY BENEFICIARY OF ALL SUBSEQUENT DISTRIBUTIONS OR * REDISTRIBUTIONS OF THE SUBJECT SOFTWARE. ANYONE WHO USES, REPRODUCES, * DISTRIBUTES, MODIFIES OR REDISTRIBUTES THE SUBJECT SOFTWARE, AS DEFINED * HEREIN, OR ANY PART THEREOF, IS, BY THAT ACTION, ACCEPTING IN FULL THE * RESPONSIBILITIES AND OBLIGATIONS CONTAINED IN THIS AGREEMENT. * * Government Agency: National Aeronautics and Space Administration * Government Agency Original Software Designation: GSC-15354-1 * Government Agency Original Software Title: GEOS-5 GCM Modeling Software * User Registration Requested. Please Visit http://opensource.gsfc.nasa.gov * Government Agency Point of Contact for Original Software: * Dale Hithon, SRA Assistant, (301) 286-2691 * * +-======-+ function rmstring (args) 'run getenv VERBOSE' verbose = result "get_titles "args" 1" desc = result "get_titles "args" 2" string = result if( verbose != NULL ) say 'Inside rmstring, desc: 'desc say 'Inside rmstring, string: 'string endif * Remove STRING from DESC * ----------------------- dlength = getlength(desc) slength = getlength(string) if( verbose != NULL ) say 'Inside rmstring, desc length: 'dlength say 'Inside rmstring, string length: 'slength endif alias = "" i = 1 while ( i<=dlength ) dum = substr(desc,i,slength) if( dum != string ) bit = substr(desc,i,1) alias = alias % bit if( verbose != NULL ) ; say 'i: 'i' alias: 'alias' dum: 'dum ; endif i = i+1 else if( verbose != NULL ) ; say 'i: 'i' alias: 'alias' dum: 'dum ; endif i = i + slength endif if( verbose != NULL ) if( i > 256 ) say 'Hit Enter to continue ...' pull flag endif endif endwhile desc = alias return desc function getlength (string) maxlength = 256 tb = "" i = 1 while (i<=maxlength) blank = substr(string,i,1) if( blank = tb ) length = i-1 i = maxlength + 1 else i = i + 1 endif endwhile return length