| United States-English |
|
|
|
![]() |
HP Fortran 90 Programmer's Reference: HP Fortran 90 Programmer's Reference > Chapter 10 HP Fortran 90 statements |
|
Writes to standard output. SyntaxThe syntax of the PRINT statement can take one of two forms:
DescriptionThe PRINT statement transfers data from memory to standard output. (Unit 6 is preconnected to the HP-UX standard output.) The PRINT statement can be used to perform formatted, list-directed, and namelist-directed I/O only. To direct output to a connected file, use the WRITE statement. ExamplesThe examples in this section illustrate different uses of the PRINT statement. Formatted output The following statement writes the contents of the variables num and des to standard output, using the format specification in the FORMAT statement at label 10:
List-directed output The following statement uses list-directed formatting to print the literal string x= and the value of the variable x:
Embedded format specification The following statement uses an embedded format specification to print the same output:
Namelist-directed output The following statement prints all variables in the namelist group coord, using namelist-directed formatting:
Related statementsFORMAT and WRITE Related conceptsFor related information, see the following: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|||||||||||||||