Elsevier Science Home
Computer Physics Communications Program Library
Full text online from Science Direct
Programs in Physics & Physical Chemistry
CPC Home

[Licence| Download | New Version Template] abvy_v1_0.gz(19 Kbytes)
Manuscript Title: FSCRIPT: a full portable text formatting program.
Authors: O.E. Taurian
Program title: FSCRIPT
Catalogue identifier: ABVY_v1_0
Distribution format: gz
Journal reference: Comput. Phys. Commun. 22(1981)85
Programming language: Fortran.
Computer: IBM 370/155-158.
Operating system: OS/MVT.
RAM: 54K words
Word size: 32
Keywords: General purpose, Utility, Automatic text Formatting, Full portable program, Ans-fortran.
Classification: 4.14.

Nature of problem:
To produce manuscripts, reports and several other types of written documents is a task that the physicist must face far too frequently. FSCRIPT is an automatic formatting program designed to meet these requirements.

Solution method:
The text words are read in as card images and the first column of each input card is inspected. If the character "." (period) is found then the input character is considered to have (at least) a command. Otherwise it is taken as a part of the text. If a command is detected then it is analysed and actions are taken according to the values of the operands. Then the input line is further inspected because several commands are allowed in a line. The remainder of the line, after the execution of all the commands, is taken as a part of the input text, unless it is empty. The text words are placed in an array and their positions in it are controlled by the left-margin and the line-length. The array is filled in such a way that no word is split between two lines. Once the line is full the text is right-adjusted (right- justification) and printed out.

Any type of text may be handled with FSCRIPT. However, the line length must not be less than 15 or greater than 132.

Running time:
The running time depends mainly on the size of the input text and, to a lesser extent, on the number of commands issued. For the test run the CPU-time was 1.42 s on an IBM 370/155-158.