fpt and WinFPT Reference Manual - Command-line Commands
| SimCon Home | Ref Manual Home |
CHANGE ENCODE TO INTERNAL WRITE
Syntax:
[DO NOT] CHANGE ENCODE TO [ INTERNAL ] WRITE
Function:
fpt changes all ENCODE statements to internal WRITE statements. The original ENCODE statements remain in place but are are commented out.
To change DECODE statements, specify CHANGE DECODE TO INTERNAL READ.
Where to Use this Command
Operating system command line | Yes |
Configuration file, config.fsp | Yes |
Specification (fsp) files, *.fsp | Yes |
Interactively, to FPT> prompt | Yes |
Interactive command files | Yes |
Embedded in the Fortran code | No |
Default
ENCODE statements are not modified by default.
Examples
Where the number of characters is specified in the first argument to ENCODE, and CHX is a character variable.
ENCODE (16,'(''Hello '',1A5)',CHX)'World!'
fpt translates this statement to:
! ENCODE (16,'(''Hello '',1A5)',CHX)'World!' WRITE (CHX(1:16),'(''Hello '',1A5)')'World!'
Where the number of characters is not specified, the length is taken from the FORMAT specification. For example:
ENCODE ('(2A6)',CHX)'Hello ',WORLD
The translated code is:
! ENCODE ('(2A6)',CHX)'Hello ',WORLD WRITE (CHX,'(2A6)',)'Hello ',WORLD
Copyright ©1995 to 2024 Software Validation Ltd. All rights reserved.