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 * @(#)subout.c 5.1 06/07/85 7 */ 8 9 #include <stdio.h> 10 11 subout(varn, offset, procn, line) 12 char *varn, *procn; 13 long int offset; 14 int line; 15 { 16 register int i; 17 18 fprintf(stderr, "Subscript out of range on line %d of procedure ", line); 19 for(i = 0 ; i < 8 && *procn!='_' ; ++i) 20 putc(*procn++, stderr); 21 fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ", offset+1); 22 for(i = 0 ; i < 6 && *varn!=' ' ; ++i) 23 putc(*varn++, stderr); 24 fprintf(stderr, ".\n"); 25 f77_abort(); 26 } 27