FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference 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 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

Yes


Default:

ENCODE statements are not modified by default.

Example:

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:

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:

WRITE (CHX,'(2A6)',)'Hello ',WORLD


Copyright ©1995 to 2014 Software Validation Ltd. All rights reserved.