/[MITgcm]/MITgcm_contrib/ESMF/mytools/print_sub.awk
ViewVC logotype

Annotation of /MITgcm_contrib/ESMF/mytools/print_sub.awk

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.1 - (hide annotations) (download)
Mon Feb 16 01:07:15 2004 UTC (21 years, 5 months ago) by cnh
Branch: MAIN
CVS Tags: adoption_1_0_pre_A, HEAD
Files from work with Erik

1 cnh 1.1 # AWK script used to print out "END SUBROUTINE" at the end of all the SUBROUTINES in
2     # a module instead of just "END". Who put this in the F90 and standard and why. I wonder?
3     #
4     BEGIN{isub=0}
5     /^ *[Ss][Uu][Bb][Rr][Oo][Uu][Tt][Ii][Nn][Ee]/,/^ *[Ee][Nn][Dd] *$/ {printf("%s",$0); isub=1}
6     /^ *[Ee][Nn][Dd] *$/{if (isub==1){isub=2}}
7     { if ( isub==0 ) {}
8     else if ( isub==1 ) {printf("\n")}
9     else if ( isub==2 ) {printf(" SUBROUTINE\n");isub=0;printf(".") | "cat >&2"}
10     }
11     END{printf("\n") | "cat >&2"}

  ViewVC Help
Powered by ViewVC 1.1.22