Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83; site fortune.UUCP
Path: utzoo!linus!philabs!cmcl2!floyd!harpo!ihnp4!fortune!phipps
From: phipps@fortune.UUCP (Clay Phipps)
Newsgroups: net.lang.f77
Subject: Re: strange statements
Message-ID: <2503@fortune.UUCP>
Date: Fri, 10-Feb-84 17:59:07 EST
Article-I.D.: fortune.2503
Posted: Fri Feb 10 17:59:07 1984
Date-Received: Sat, 11-Feb-84 23:21:18 EST
References: <1947@mcnc.UUCP>
Organization: Fortune Systems, Redwood City, CA
Lines: 49

The statements you cited:

o   ACCEPT
o   TYPE
o   ENCODE
o   DECODE

are common extensions to FORTRAN.  ENCODE and DECODE have been around
since FORTRAN 66 days.  All the above statements are documented
in the DEC VAX FORTRAN manual.  Maybe some VAX/VMS heathen at your site
has a copy.

I am working entirely from volatile memory here,
so be forewarned that this might not be correct to the letter.

ENCODE and DECODE perform conversion between internal representation
of arithmetic data and their external character string denotation.
The order and meaning of the arguments may not be the same
for all FORTRAN compilers supporting these extensions, by the way;
in particular, DEC FORTRAN may not have the same syntax as DG FORTRAN.
Rather than support these intrinsics in FORTRAN 77,
the ANSI committee decided to implement "internal input/output",
which is a more general facility derived (as far as I know)
from PL/I's PUT STRING / GET STRING statements.
Syntactically, internal input/output looks like ordinary READ and WRITE
statements that have a string variable substituted for the unit number.
Conversion to vanilla FORTRAN 77 *ought to* be straightforward.

TYPE and ACCEPT are interactive input/output statements.
I don't know much about them.
I believe that ACCEPT is an interactive READ,
and TYPE is an interactive WRITE.
The strings that are part of the statements are used as prompts, I think.
I don't know if their behavior is so special that they can't be simulated
by READs and WRITEs to whatever FORTRAN unit number is mapped
to UNIX standard input and output.
As the foregoing reveals, I have never used FORTRAN on UNIX,
and I hope things stay that way.

Don't really know why I went into all this detail from fuzzy memory;
I'm sure that Greg "FORTRAN Hacker" Woods probably has really reliable
answers at his fingertips, but what the h*ll....  Good luck.

-- Clay ("I hate FORTRAN") Phipps

-- 
   {allegra,amd70,cbosgd,dsd,floyd,harpo,hpda,ihnp4,
    megatest,nsc,oliveb,sri-unix,twg,varian,VisiA,wdl1}
   !fortune!phipps