HP 3000 Manuals

PRINT Statement (Executable) [ HP FORTRAN 77/iX Reference ] MPE/iX 5.0 Documentation


HP FORTRAN 77/iX Reference

PRINT Statement (Executable) 

The PRINT statement only transfers data from memory to the standard
output unit.  (FORTRAN unit 6 is preconnected to the standard output
device.)

[]
---------------------------------------------------------------------------------------------- | | | | | Item | Description/Default | Restrictions | | | | | ---------------------------------------------------------------------------------------------- | | | | | fmt | Format designator. | See "Semantics". | | | | | ---------------------------------------------------------------------------------------------- | | | | | implied_do_list | An implied DO loop. Refer | None. | | | to "DO Statement | | | | (Executable)". | | | | | | ---------------------------------------------------------------------------------------------- Semantics The format designator must be one of the following: * The statement label of a FORMAT statement. * An INTEGER*4 variable to which the statement label of a FORMAT statement has been assigned by an ASSIGN statement. * A character or noncharacter array name that contains the representation of a format specification. The use of a noncharacter array is an extension to the ANSI 77 standard. * A character expression that evaluates to a valid format string. Variable format descriptors are allowed only in character constant expressions. * An asterisk to specify list-directed output (refer to "List-Directed Input/Output" ). Each item in the list of data to be transferred must be one of the following: * A constant * A variable name * An expression * An array name * An array element * A substring * A scalar record field name * An implied DO loop The PRINT statement is equivalent to the TYPE statement. Examples Notes -------------------------------------------------------------------------------------- PRINT 10,num,des num and des are printed according to FORMAT statement 10. PRINT *,'x=',x 'x=' and the value of x are printed according to list-directed formatting. INTEGER fmt rat and cat are printed according ASSIGN 200 TO fmt to FORMAT statement 200. PRINT fmt,rat,cat PRINT '(4I3)',i,j,k*2,330 i, j, k*2, and the constant 330 are printed according to the format specification in the PRINT statement itself. PRINT 100 The character constant in the 100 FORMAT ("End of report") FORMAT statement is printed. PRINT '(" x SIN(x) COS(x)"//(I3,2F7.3))', Prints a literal heading and 73 +(i,SIN(i/57.3),COS(i/57.3),i=0,360,5) rows of values as indicated by the implied DO in the output list.


MPE/iX 5.0 Documentation