func Begin(){ SoPtNm = 990; incshot = 10; initrec = 1; counter = 0; nrec = 0; /* DphInd = RecInd + SrcLoc/10 */ } func OnLineHeader(){ ntrc = LH.NumTrc; output(LH); } func OnTrace(){ if ( counter%ntrc == 0 ) { /* starting a new record */ SoPtNm = SoPtNm + incshot; Tr.SoPtNm = SoPtNm; SrcLoc = (SoPtNm * 10) + 5; Tr.SrcLoc = SrcLoc; RecInd = 1; Tr.RecInd = RecInd; Tr.DphInd = Tr.RecInd + SoPtNm; /* print (" SoPtNm = ",SoPtNm," SrcLoc = ",SrcLoc," RecInd = ",RecInd," DphInd = ",Tr.DphInd,"\n"); */ }else{ /* in the same record */ Tr.SoPtNm = SoPtNm; Tr.SrcLoc = SrcLoc; RecInd = RecInd + 1; Tr.RecInd = RecInd; Tr.DphInd = RecInd + SoPtNm; } Tr.LinInd = 0; output(Tr); counter++; } func End(){ print(" Done \n"); }