FPT and WinFPT Reference Manual - Command-line Commands

| SimCon Home | Reference Manual Home |


ACCEPT CHARACTER

Syntax:

[DO NOT] ACCEPT CHARACTER: <string>

Function:

Instructs FPT to accept or to reject a non-alphanumeric character as a legal character within the name of a user-defined symbol (for example, a variable, a COMMON block name or a sub-program name). The character to be accepted or rejected is enclosed in single or double quotes. The available characters are:

# $ % & @ _ :

$ and _ (underscore) are accepted by most Fortran dialects, but all of these characters are used by at least one implementation of the language. FPT imposes the following rules for their use:

  1. These characters may not begin a user-defined symbol except the name of a subroutine. A problem arises with implicit typing if this restriction is not made.

  2. If a symbol which contains the characters #, %, &, @ and : is referenced in an FPT command, the symbol must be enclosed in quotes.

A difficulty arises with names containing the character : (colon). This is used in sub-program and variable names by Gould-SEL (now Encore) Fortran for the Concept series of computers, which are widely used in real-time simulation. It is not always possible for FPT to distinguish between a range or sub-string specification which contains a colon and a name with an embedded colon. Users are advised to watch for and to suppress spurious errors.

Where to use this command:

Operating system command line

Yes


Configuration file, config.fsp

Yes


Specification (FSP) files, *.fsp

Yes


Interactively, to FPT> prompt:

No


Interactive command files

No


Embedded in the Fortran code

Yes


Default:

The characters $ and _ are accepted and the characters #, %, &, @ and : are rejected by default (Note that defaults may be changed in the configuration file).

Example:

FPT is run under Windows with the command:

D:\John\Test> fpt %accept_character:':' encorelib.fsp

The sub-program name M:TDAY is then accepted.


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