1: /* 2: * Copyright (c) 1980 Regents of the University of California. 3: * All rights reserved. The Berkeley software License Agreement 4: * specifies the terms and conditions for redistribution. 5: * 6: * @(#)s_rnge.c 5.1 6/7/85 7: */ 8: 9: #include <stdio.h> 10: 11: /* called when a subscript is out of range */ 12: 13: s_rnge(varn, offset, procn, line) 14: char *varn, *procn; 15: long int offset; 16: int line; 17: { 18: register int i; 19: 20: fprintf(stderr, "Subscript out of range on file line %d, procedure ", line); 21: for(i = 0 ; i < 8 && *procn!='_' ; ++i) 22: putc(*procn++, stderr); 23: fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ", offset+1); 24: for(i = 0 ; i < 6 && *varn!=' ' ; ++i) 25: putc(*varn++, stderr); 26: fprintf(stderr, ".\n"); 27: f77_abort(0); 28: }