1 /*- 2 * Copyright (c) 1980 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * %sccs.include.proprietary.c% 6 */ 7 8 #ifndef lint 9 static char sccsid[] = "@(#)subout.c 5.2 (Berkeley) 04/12/91"; 10 #endif /* not lint */ 11 12 #include <stdio.h> 13 14 subout(varn, offset, procn, line) 15 char *varn, *procn; 16 long int offset; 17 int line; 18 { 19 register int i; 20 21 fprintf(stderr, "Subscript out of range on line %d of procedure ", line); 22 for(i = 0 ; i < 8 && *procn!='_' ; ++i) 23 putc(*procn++, stderr); 24 fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ", offset+1); 25 for(i = 0 ; i < 6 && *varn!=' ' ; ++i) 26 putc(*varn++, stderr); 27 fprintf(stderr, ".\n"); 28 f77_abort(); 29 } 30