HP 3000 Manuals

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


HP FORTRAN 77/iX Reference

ENCODE Statement (Executable) 

The ENCODE statement transfers data from variables to internal storage
according to a format specification.

[]
----------------------------------------------------------------------------------------------- | | | | | Item | Description/Default | Restrictions | | | | | ----------------------------------------------------------------------------------------------- | | | | | count | Integer expression that specifies | Must be the first item. | | | the number of bytes to be | | | | translated. | | | | | | ----------------------------------------------------------------------------------------------- | | | | | fmt | Format designator. | Must be the second item; must be | | | | as specified for the PRINT | | | | statement. | | | | | ----------------------------------------------------------------------------------------------- | | | | | unit | Internal storage designator. | Must be the third item; must be a | | | | scalar variable or array name; | | | | assumed-size and adjustable-size | | | | arrays are not permitted. | | | | | ----------------------------------------------------------------------------------------------- | | | | | ios | Integer variable, array element, | None. | | | or scalar record field for error | | | | code return. | | | | | | ----------------------------------------------------------------------------------------------- | | | | | label | Statement label of an executable | None. | | | statement; if an error occurs or | | | | an end-of-file is detected during | | | | execution of the ENCODE statement, | | | | control transfers to the statement | | | | specified by this label rather | | | | than aborting the program. | | | | | | ----------------------------------------------------------------------------------------------- | | | | | list | List specifying the data to be | If list contains a function | | | transferred. Each item must be a | reference, that function must not | | | variable name, an array element | contain any PRINT, READ, WRITE, | | | name, an array name, a scalar | ENCODE, or DECODE statements. | | | record field name, a substring, or | | | | an expression. | | | | | | ----------------------------------------------------------------------------------------------- Semantics The ENCODE statement is provided for compatibility with older versions of FORTRAN. It is a nonstandard statement, and its use in new programs is strongly discouraged. If possible, use the internal file capabilities of the WRITE statement instead. Examples Notes -------------------------------------------------------------------------------------- CHARACTER*20 buf After this ENCODE statement, buf ENCODE (15,'(2x,3I4,1X)', buf) 1234,45,-12 contains: Delta Delta 1234 Delta Delta 45 Delta -12 Delta Delta Delta Delta Delta Delta where Delta represents a blank.


MPE/iX 5.0 Documentation