[comp.lang.fortran] Run time error in Vax Fortran-77

CHETAN@rcgl1.eng.ohio-state.edu (Chetan Rastogi) (10/30/90)

      THIS PROBLEM MAY BE SPECIFIC TO VAX FORTRAN-77 AND THE VMS SYSTEM


Hi Net-People:

Thanks a lot to all those who helped me a few weeks back.  Lack of time
prevented me from thanking everyone individually, but your help was very
valuable.

I am using an internal write to append an integer variable to a character
string.  The resulting character string is used as a selection criterion in my
program, and I recursively want to change the value of the character string.
Problem: The first time I use the internal write it works, but the next
time around it bombs out with the message below.

%FOR-F-INVARGFOR invalid argument to the fortran run time library ( at line 202)

Line 202 in module f_type is :

      write(faceid,'(a,i10)')tempc,jdata(1,i)

where faceid is defined as character*20, tempc is character*10 /'FACE_ID = '/
and jdata is an integer array.

The reference manual states
INVARGFOR      * Invalid argument to the run time library in PDP-11 fort.
               * Compiler version is newer than the run time library. ( this
certainly isn't the case on our system)

For the first time the value of faceid = 'FACE_ID =          1'
However, when I output the value of faceid just before it is set for the second
time ( at line 202), faceid is blank.  I DO NOT modify faceid in the interim.

Also tried using the debugger, but to no avail as some of my routines are
external for which I have no source code.  ( program crashes before line 202 in
one of the external routines).

Extremely puzzling to a programming novice like me.  Any help/pointers
for debugging will be greatly appreciated. Please email or post.
__________________________________________________________________________
TRANSCRIPT OF THE RUN FOLLOWS:

ENTER THE DATABASE NAME (<= 80 CHARS)
'box'
ENTER THE DATABASE SCRATCH LOGICAL UNIT NO.
1
iret(pdistb) =            0
going to main program
going to f_type .........
in f_type
columns added
iret (pdiacd) =            0
iret (ppxrfc) =            0
facetype found for first face...
processing completed for face 1
%FOR-F-INVARGFOR, invalid argument to FORTRAN Run-Time Library  user PC 00266AC2
%TRACE-F-TRACEBACK, symbolic stack dump follows
module name     routine name                     line       rel PC    abs PC

                                                           002CA79E  002CA79E
                                                           002CA6AB  002CA6AB
                                                           002C7101  002C7101
F_TYPE          F_TYPE                            202      000004EA  00266AC2
WINGEDEDGE      WINGEDEDGE                        129      000001DE  002659DE


Thanks,

Chetan