[comp.lang.fortran] Mil-Std-1753

hirchert@uxe.cso.uiuc.edu (03/10/88)

There was a request for information on MIL-STD-1753.  I've been carrying a copy
of 1753 around with me for several weeks now, but I left it home today because
my briefcase was getting too heavy, so I'll try to answer the questions from
memory.

1753 is a grab bag of features desired by DoD.  They include
1. extensions to the DO statement - DO WHILE and END DO are both part of this
   collection, but the way in which these features fit together is somewhat
   irregular.
2. an INCLUDE statement - The text of 1753 does _not_ require apostrophes
   around the file, although many implementers of 1753 have interpreted it as
   allowing the apostrophes to be required on a particular processor.  Others
   disallow the apostrophes.  Still others make them optional.  The INCLUDE
   statement proposal considered by X3J3 was essentially the 1753 INCLUDE
   statement with apostrophes (or quotation marks) required.
3. functions to manipulate bits in the guise of integers - Most of these 
   functions can also be found in ISA 61.1 or the IRTF (Industrial Real Time
   Fortran) standard.

While standards have the force of law in many European countries, in the U.S.
they are only a focused form of market pressure.  You are free to implement a
FORTRAN compiler that doesn't conform to X3.9-1978 as long as you don't
fraudulently claim that it does conform.  The GSA chose to make X3.9-1978
(i.e. FORTRAN 77) a purchasing standard for the entire U.S. government.  This
is a sufficiently large market that nearly all FORTRAN compilers conform to
at least the subset language defined in FORTRAN 77.  MIL-STD-1753 applies only
to DoD and has been ignored by many vendors although I would guess that a
majority do implement it.

Kurt W. Hirchert     National Center for Supercomputing Applications

bernhold@qtp.ufl.edu (David E. Bernholdt) (02/17/90)

Well, it worked!  I just got my copy of the MIL-STD-1753 supplement to
ANSI's Fortran77.  To start your order, call the Naval Publications
and Forms Center at 215 697 2667.  You'll get a customer number from a
human there, and they'll direct you to call into their touch-tone
order entry system to place the order.  Mine took about 2 weeks and it
was free.  There was a notation on the mailing cover that no more than
5 copies of anything would be provided.

Here, in brief, is what is in the supplement:

END DO
	Terminates an ANSI DO stmt or a DO WHILE.  For ANSI DO, it
	must be labeled.

DO [label [,]] WHILE (logical expression)
	Must be terminated with an END DO.

INCLUDE filename
	Allows non-recursive includes.  Filename is processor
	dependent.  The included file must not be empty nor can it be
	a continuation line.

IMPLICIT NONE
	Voids all default implicit typing except for intrinsic
	functions.

read and write past end-of-file
	Processor must provide a facility that permits reading and
	writing to continue past an endfile record on an unlabeles
	magnetic tape sequential file.  Reading past an endfile is not
	permitted if the READ stmt does not contain an END= or IOSTAT=
	specifier.  The processor may require execution of a special
	subroutine or stmt before it permits such reading or writing.

IOR(m,n), IAND(m,n), NOT(m), IEOR(m,n)
	Logical bit operations.

ISHFT(m, k), ISHFTC(m, k, ic)
	Bit shifts: k > 0 = left shift, k = 0 = no shift, k < 0 =
	right shift.  For ISHFTC, the rightmost IC bits are shifted
	circularly k places.

IBITS(m, i, len)
	Extract a subfield of len bits from m starting with position i
	and extending left for len bits.  The result is right
	justified and remaining bits are zeroed.

MVBITS(m, i, len, n, j)
	Moves len bits from i through i+len-1 of m to positions j
	through j+len-1 or n.  The remainder of n is unchanged.

BTEST(n, i), IBSET(n, i), IBCLR(n, i)
	Test, set, or clear bit i of argument n.

Bit constants: O'd1d2d3...' and Z'h1h2h3...'
	di represent octal digits, and hi represent hexadecimal
	digits.  These constants are right-justified and may be
	associated only with integer entities.  These constants may
	appear only in DATA stmts.

The actual text isn't much longer than this either...
-- 
David Bernholdt			bernhold@qtp.ufl.edu
Quantum Theory Project		bernhold@ufpine.bitnet
University of Florida
Gainesville, FL  32611		904/392 6365