Download FEAP - - A Finite Element Analysis Program
Transcript
CHAPTER 2. DATA INPUT AND OUTPUT iow ilg 6 from keyboard) - output file unit number - solution log file unit number If an error occurs during input from the keyboard FEAP returns a value of true for the function and a user may reinput the record if the implied loop shown above is used. For inputs from a file, the program will stop and an error message indicating the type of error occurring and the location in an input file is written to the output file. The input routines return data in a real*8 array td(*). If any td(i) is to be used as an integer or real*4 quantity, it must be cast to the correct type. That is, the following operations should be used to properly cast the variable type: real*4 real*8 integer logical t td(5) j errck, pinput errck = pinput (td, 5) j = nint( td(1)) t = float(td(2)) ! Integer assignment ! Real*4 assignment PINPUT may be used to input up to 16 individual expressions on one input record (each input record is, however, limited to 255 characters). The routine TINPUT differs from PINPUT by permitting text data to also be input. It is useful for writing user commands or to input data described by character arrays. The routine is used as logical integer character real*8 errck, tinput nt, nn text(16)*16 td(16) errck = tinput(text,nt,td,nn) The parameter nt specifies the number of text values to input and the nn specifies the number of real data values to input. The value for parameter nt or nn may be zero. Thus the use of errck = tinput(text,0,td,nn) is equivalent to errck = pinput(td,nn)