.INDENT 0
.NNM
.LM 5
.RM 70
.SKIP 20
.C
^^FLECS:
.SKIP
.C
USER'S MANUAL\\
.SKIP 5
.C
^UNIVERSITY OF ^OREGON ^EDITION
.S
.C
(^MODIFIED FOR ^^CARTS\\)
.SKIP
.C
^THIS MANUAL CORRESPONDS TO VERSION 22 OF ^FLECS.
.C
(^REVISED ^OCTOBER 1, 1975)
.SKIP 10
.BR
	^AUTHOR:		^TERRY ^BEYER
.S
.BR
	^ADDRESS:	^COMPUTING ^CENTER
.BR
			^UNIVERSITY OF ^OREGON
.BR
			^EUGENE, ^OREGON 97403
.S
.BR
	^TELEPHONE:	(503) 686-4416
.S
.BR
	^PUBLISHED BY:	^DEPARTMENT OF ^COMPUTER ^SCIENCE
.BR
			^UNIVERSITY OF ^OREGON
.S 5
.P
^NEITHER THE AUTHOR NOR THE ^UNIVERSITY OF ^OREGON SHALL BE LIABLE
FOR ANY DIRECT OR INDIRECT, INCIDENTAL, CONSEQUENTIAL, OR SPECIFIC
DAMAGES OF ANY KIND OR FROM ANY CAUSE WHATSOEVER ARISING OUT OF OR IN
ANY WAY CONNECTED WITH THE USE OR PERFORMANCE OF THE ^FLECS SYSTEM
OR ITS DOCUMENTATION.
.P
^THIS MANUAL IS IN THE PUBLIC DOMAIN AND MAY BE ALTERED OR REPRODUCED
WITHOUT THE EXPLICIT PERMISSION OF THE AUTHOR. ^PLEASE COMMUNICATE
ANY ERRORS, AMBIGUITIES, OR OMISSIONS TO THE AUTHOR.
.PAGE
.BR
^^ACKNOWLEDGEMENTS\\
.INDENT 5
.P
^THE AUTHOR IS INDEBTED TO MANY PEOPLE FOR ASSISTANCE OF ONE FORM
OR ANOTHER DURING THE COURSE OF THIS PROJECT. ^MIKE ^DUNLAP, ^KEVIN
^MC^COY, AND ^PETER ^MOULTON DESERVE SPECIAL THANKS FOR MANY
HELPFUL AND FRUITFUL DISCUSSIONS, SUGGESTIONS, AND ENCOURAGEMENTS.
^I AM GRATEFUL TO MY WIFE, ^KATHLEEN, WHO ASSISTED IN MANY WAYS
INCLUDING SHIELDING ME FROM THE HARSH REALITY OF ^^JCL\\ AND 360
^ASSEMBLY ^LANGUAGE. ^TEXT PREPARATION WAS ADROITLY ACCOMPLISHED
BY ^MARVA ^VAN^NATTA, ^ALLYENE ^TOM, ^DIANE ^LANE, AND ^KATHLEEN
^BEYER.
.P
^THIS PROJECT WAS INITIATED WHILE THE AUTHOR WAS WORKING UNDER A
GRANT PROVIDED BY THE ^OFFICE OF ^SCIENTIFIC AND ^SCHOLARLY ^RESEARCH
OF THE ^GRADUATE ^SCHOOL AT THE ^UNIVERSITY OF ^OREGON. ^WORK ON THE
PROJECT HAS ALSO BEEN SUPPORTED IN PART BY THE ^DEPARTMENT OF ^COMPUTER
^SCIENCE AND BY THE ^COMPUTING ^CENTER OF THE ^UNIVERSITY OF ^OREGON
.PAGE
.NM 0
.TITLE #####FLECS USER'S MANUAL
.BR
1.0  ^^INTRODUCTION\\
.BR
.INDEX 1.0 ^^INTRODUCTION\\
.P
^FORTRAN CONTAINS FOUR BASIC MECHANISMS FOR CONTROLLING PROGRAM
FLOW:  ^^CALL/RETURN, IF, DO\\, AND VARIOUS FORMS OF THE ^^GO TO\\.
.P
^FLECS IS A LANGUAGE EXTENSION OF ^FORTRAN WHICH HAS ADDITIONAL CONTROL
MECHANISMS. ^THESE MECHANISMS MAKE IT EASIER TO WRITE ^FORTRAN BY
ELIMINATING MUCH OF THE CLERICAL DETAIL ASSOCIATED WITH CONSTRUCTING
^FORTRAN PROGRAMS. ^FLECS IS ALSO EASIER TO READ AND COMPREHEND THAN
^FORTRAN.
.P
^THIS MANUAL IS INTENDED TO BE A BRIEF BUT COMPLETE INTRODUCTION TO
^FLECS. ^IT IS NOT INTENDED TO BE A PRIMER ON ^FLECS OR STRUCTURED
PROGRAMMING. ^THE READER IS ASSUMED TO BE A KNOWLEDGEABLE ^FORTRAN
PROGRAMMER.
.P
^FOR PROGRAMMERS TO WHOM TRANSPORTABILITY OF THEIR PROGRAMS IS A
CONCERN, IT SHOULD BE NOTED THAT THE ^FLECS TRANSLATOR SOURCE CODE
IS IN THE PUBLIC DOMAIN AND IS MADE FREELY AVAILABLE. ^THE TRANSLATOR
WAS WRITTEN WITH TRANSPORTABILITY IN MIND AND REQUIRES LITTLE EFFORT
TO MOVE FROM ONE MACHINE TO ANOTHER. ^THOSE INTERESTED IN MOVING
^FLECS TO ANOTHER MACHINE OR IN HAVING THEIR OWN COPY OF ^FLECS SHOULD
CONTACT THE AUTHOR.
.P
^THE MANNER OF IMPLEMENTATION OF ^FLECS IS THAT OF A PREPROCESSOR WHICH
TRANSLATES ^FLECS PROGRAMS INTO ^FORTRAN PROGRAMS. ^THE RESULTING
^FORTRAN PROGRAM IS THEN PROCESSED IN THE USUAL WAY. ^THE TRANSLATOR
ALSO PRODUCES A NICELY FORMATTED LISTING OF THE ^FLECS PROGRAM WHICH
GRAPHICALLY PRESENTS THE CONTROL STRUCTURES USED.
.S
.TEST PAGE 5
.INDEX 2.0 ^^RETENTION OF FEATURES\\
.S
.BR
2.0  ^^RETENTION OF FORTRAN FEATURES\\
.BR
.P
^THE ^FLECS TRANSLATOR EXAMINES EACH STATEMENT IN THE ^FLECS PROGRAM
TO SEE IF IT IS AN ^^EXTENDED STATEMENT\\ (A STATEMENT VALID IN ^FLECS
BUT NOT IN ^FORTRAN). ^IF IT IS RECOGNIZED AS AN EXTENDED STATEMENT,
THE TRANSLATOR GENERATES THE CORRESPONDING ^FORTRAN STATEMENTS. ^IF,
HOWEVER, THE STATEMENT IS NOT RECOGNIZED AS AN EXTENDED STATEMENT,
THE TRANSLATOR ASSUMES IT MUST BE A ^FORTRAN STATEMENT AND PASSES IT
THROUGH UNALTERED. ^THUS ^^THE FLECS SYSTEM DOES NOT RESTRICT THE USE
OF FORTRAN STATEMENTS\\, IT SIMPLY PROVIDES A SET OF ADDITIONAL STATEMENTS
WHICH MAY BE USED. ^IN PARTICULAR, ^^GO TO\\S, ARITHMATIC ^I^FS, ^^CALL\\S,
ARITHMETIC STATEMENT FUNCTIONS, AND ANY OTHER ^FORTRAN STATEMENTS, COMPILER
DEPENDENT OR OTHERWISE, MAY BE USED IN A ^FLECS PROGRAM.
.PAGE
.INDEX 3.0 ^^CORRELATION OF SOURCES\\
.S
.BR
3.0  ^^CORRELATION OF FLECS AND FORTRAN SOURCES\\
.BR
.P
^ONE DIFFICULTY OF PREPROCESSOR SYSTEMS LIKE ^FLECS IS THAT ERROR
MESSAGES WHICH COME FROM THE ^FORTRAN COMPILER MUST BE RELATED BACK TO
THE ORIGINAL ^FLECS SOURCE PROGRAM. ^THIS DIFFICULTY IS REDUCED BY
ALLOWING THE PLACEMENT OF ^^LINE NUMBERS\\ (NOT TO BE CONFUSED WITH
^FORTRAN STATEMENT NUMBERS) ON ^FLECS SOURCE STATEMENTS. ^THESE LINE
NUMBERS THEN APPEAR ON THE LISTING AND IN THE ^FORTRAN SOURCE. ^WHEN
AN ERROR MESSAGE IS PRODUCED BY EITHER THE ^FLECS TRANSLATOR OR THE
^FORTRAN COMPILER, IT WILL INCLUDE THE LINE NUMBER OF THE OFFENDING
^FLECS SOURCE STATEMENT, MAKING IT EASY TO LOCATE ON THE LISTING.
.P
^IF THE PROGRAMMER CHOOSES NOT TO SUPPLY LINE NUMBERS, THE TRANSLATOR
WILL ASSIGN SEQUENTIAL NUMBERS AND PLACE THEM ON THE LISTING AND IN THE
^FORTRAN SOURCE. ^THUS, ERRORS FROM THE COMPILER MAY STILL BE RELATED
TO THE ^FLECS PROGRAM.
.P
^DETAILS OF LINE NUMBERING ARE MACHINE DEPENDENT AND ARE GIVEN IN
SECTION 10. ^ON MOST CARD ORIENTED SYSTEMS, THE LINE NUMBERS MAY BE
PLACED IN COLLUMNS 76-80 OF EACH CARD. ^OTHER SYSTEMS MAY HAVE SPECIAL
PROVISIONS FOR LINE NUMBERS.
.P
^THE BEGINNING ^FLECS PROGRAMMER SHOULD DISCOVER AND MAKE SPECIAL NOTE
OF THE DETAILS OF THE MECHANISMS BY WHICH ^FORTRAN COMPILER ERROR MESSAGES
MAY BE TRACED BACK TO THE ^FLECS LISTING ON THE SYSTEM BEING USED.
.S
.TEST PAGE 6
.BR
.INDEX 4.0 ^^STRUCTURED STATEMENTS\\
.S
.BR
4.0  ^^STRUCTURED STATEMENTS\\
.BR
.P
^A BASIC NOTION OF ^FLECS IS THAT OF THE ^^STRUCTURED STATEMENT\\ WHICH
CONSISTS OF A ^^CONTROL PHRASE\\ AND ITS ^^SCOPE\\. ^FORTRAN HAS TWO
