Differences between FOROTS 5A(721) and FOROTS 6 See FOROTS.DOC for list of major differences The numbers produced by FORLIB single and double routines are more accurate (and therefore different from those produced by version 5A) as a result of the rewrite of the library by IMSL. The floating point input and output routines of FOROTS have been made more accurate, so that the numbers they produce (both internally and externally) are more accurate (and, therefore different) than those produced by version 5A. The maximum number of digits encoded by the floating point output routine is increased in version 6 over that encoded by version 5A. Thus printing with format, say, E30.20 will produce different results with version 6 than with version 5A: for both real and double precision numbers the number of non-zero digits has increased to 20. FOROTS V6 does not ignore nulls encountered in a DECODE statement, whereas V5A did. Null is an illegal character in many of the conversion routines. The action of the CLOSE statement has changed in version 6, such that specification of any file parameters (e.g. FILE=) will cause a rename to be performed. Version 5A only did the rename if it detected an actual change. With version 6, recordsize is enforced for input files. The actual record size used is the record size specified, plus 2 for the carriage return, line feed sequence, plus the padding necessary to bring the record to a word boundary. Thus the formula is ((RECSIZ+6)/5)*5. Records read using a RECORDSIZE specification in the OPEN statement must have precisely this calculated number of characters. FOROTS no longer stops upon reading an end-of-line character, nor scans for them, in advancing to the next record. However, a premature end-of-line character within a record will terminate the characters read into the FOROTS internal record buffer. FORTRAN-77 specifies default is BLANK=NULL unless no OPEN statement has been executed. This conficts with 5A behavior which is BLANK=ZERO. A string of consecutive LFs is treated as one LF by 5A; version 6 treats them as multiple records. CALL ERRSET (n) now tells FOROTS to print out n warnings of each type. ERRSET extensions... CALL ERRSET(n,i) to set a limit for a specific error, CALL ERRSET(n,i,x) to call subroutine x when the error Page 2 occurs, after FOROTS error actions have occurred. Integer division by 0 now returns the largest possible integer value having the sign of the numerator. In version 5A, the value returned was the numerator. Sequential files written with version 6 without a record size specified are not padded with nulls to a word boundary, whereas version 5A padded to a word boundary to be compatible with FORSE files. This means that files written sequentially without a record size specified in the OPEN statement will, in general, not be readable as random-access files. The mixing of formatted and unformatted data in the same file is not supported in version 6, whereas it was in version 5A, albeit with many bugs. With Version 5A, BLOCKSIZE for magtape files always meant words, and the default was 128 words for TOPS-10 and 512 words for TOPS-20. With version 6, BLOCKSIZE is in bytes, 36-bit bytes for binary and image mode files, and 7-bit bytes for formatted (ASCII) files. The default is still 128 words for TOPS-10 (640 bytes for formatted files), but is 1000 bytes for TOPS-20 (i.e., different blocksizes for formatted and unformatted files). The definitions of X and T formats have changed from 66 to 77 for output statements. With -77, T and X do not actually write blanks, they merely position the record pointer. Only the actual data sets the record size, so that (A5,100X) writes a 5-character record whereas (A5,100X,' ') writes a 106 character record. With list-directed and namelist I/O, logical input data is strictly defined as an optional period, followed by a T or F, followed by any set of non-terminator characters. There will no longer be any diagnostic messages given for such trashy input. The default field width for F (with no field width supplied) for output is dependent on the type of the variable in version 6, and expands for extremely large numbers, rather than producing asterisks. In version 5A, the default field width was invariant for data type. As an extension to the ANSI standard, list-directed input will accept any data type for any variable type, and do the kind of conversion done by the compiler. This is also true for data preceded with a repetition count (e.g. 2*5.6 input to a real variable and an integer variable will provide 5.6 to the real variable and 5 to the integer variable). The exception is that if complex data is specified for a double precision variable, the DOUBLE PRECISION value of the real part is transmitted to the double precision variable (the Page 3 compiler truncates it to a single precision value and sets the 2nd word of the double precision variable to 0). With list-directed and NAMELIST I/O, certain types of data with no delimiters are interpreted differently by versions 5A and 6. For instance, with version 5A, -1-1 are read differently depending on whether the target variables are integer or real: it reads two values of minus 1 for integer, and -1E-1 for real. Version 6 always reads -1-1 as a single value (-1E-1) and converts it appropriately. The ANSI standard specifies that random-access files have no end. Version 6 obeys this rule, which is a change from version 5A. Thus the END= branch will never be taken, and should not be used, for random-access data transfer statements. For formatted data and binary unformatted data, the ERR= branch will be taken for any unwritten record, whether in the middle or at the end of the file. Since there is no way to know whether data has been written in an image mode file, the ERR= branch cannot be used for this purpose for image mode files. Since expressions will be allowed in I/O statements in Fortran-77, and the expression evaluator decodes "#" as "not equal", as of version 7 "#" will not be allowed as the record number specifier in random-access data transfer statements. Version 6 gives a warning to that effect. In I/O statements, after the format statement specifier and closing paren (if any), DEC has allowed an optional comma before the I/O list. This comma is not allowed by the ANSI standard, and is not recommended for use. There is no guarantee that DEC compilers will support the use of this comma in future releases. With version 6, if an error is encountered in reading a record, the file is positioned after the offending record, _____ so that a backspace will position the file before the offending record. Version 5A positioned the file before the offending record after an error. In version 6, dollar format is defined as suppressing the carriage return and one line feed (if any) that would normally appear if the next data transfer were a WRITE statement, or the automatic sequence that would normally be inserted by FOROTS if the next data transfer were a READ statement. Field image version 5A did not suppress the line feed for the succeeding WRITE.