s_rnge.c
Go to the documentation of this file.
00001 #include "stdio.h"
00002 #include "f2c.h"
00003 #ifdef __cplusplus
00004 extern "C" {
00005 #endif
00006 
00007 /* called when a subscript is out of range */
00008 
00009 #ifdef KR_headers
00010 extern VOID sig_die();
00011 integer s_rnge(varn, offset, procn, line) char *varn, *procn; ftnint offset, line;
00012 #else
00013 extern VOID sig_die(const char*,int);
00014 integer s_rnge(char *varn, ftnint offset, char *procn, ftnint line)
00015 #endif
00016 {
00017 register int i;
00018 
00019 fprintf(stderr, "Subscript out of range on file line %ld, procedure ",
00020         (long)line);
00021 while((i = *procn) && i != '_' && i != ' ')
00022         putc(*procn++, stderr);
00023 fprintf(stderr, ".\nAttempt to access the %ld-th element of variable ",
00024         (long)offset+1);
00025 while((i = *varn) && i != ' ')
00026         putc(*varn++, stderr);
00027 sig_die(".", 1);
00028 return 0;       /* not reached */
00029 }
00030 #ifdef __cplusplus
00031 }
00032 #endif


swiftnav
Author(s):
autogenerated on Sat Jun 8 2019 18:55:56