Hot answers tagged

46

FORTRAN was, at the time(*1), lacking almost everything, from string handling to all I/O beside reading numbers from cards or tape. Heck, not even integer size was guaranteed across machines. No real way of structuring or flow control beside GOTO — even subroutines/functions were only integrated a year before with FORTRAN II. For most parts, FORTRAN is a ...


32

The meeting that defined the requirements of the new language took place on May 28–29, 1959. Charles Phillips prepared a memo several months later summarizing the decisions made at that meeting. Its listing of requirements is reprinted on page 201 of the ACM’s History of Programming Languages. a. Majority of group supported maximum use of simple English ...


21

FORTRAN was originally developed for the IBM 704 computer, which stored integers in sign-and-magnitude format. In the original documentation, it supports fixed-point variables, which used the machine’s native format, floating-point variables, and unsigned fixed-point constants, which were intended for line numbers and subscripts. These would be translated ...


19

The use of such letters was common in mathematics long before programming existed. x, y, z were used as variables by Descartes in 1637; in his framework, a, b, c and other letters towards the start of the alphabet represented known values, letters towards the end of the alphabet represented unknown values. The use of i, j etc. doesn’t go quite that far back, ...


12

TL;DR: That being so, the assigned goto is just an indirect jump through the variable. Right. But in actual fact, the assigned goto had to be given a list of statement numbers No, it had not. The list was always an optional one. If not given, the GOTO was simply executed without any further check. What purpose does the statement-label list serve? It's ...


12

While this may cover many ways of overflow (from integer and counter all the way to record, I assume the Overflow in question is about floating point, which more precisely means over/underflow of the exponent. The exact handling varies widely between compilers and machines. Fortran 77 did not make any assumptions here (AFAIK), it at all, it was expected that ...


9

One possibility to look at might be the Hercules emulator, which emulates the IBM S/370, ESA/390, and z/Arch systems. This is emulating the 'bare iron', and does not include the operating system or utilities, but there are sources for OS images and compilers listed on that page.


9

I don't recall any overflow handling on the FORTRAN 77 compiler that I worked on and supported (Honeywell Series 60 Level 62). Any overflow would cause a program abort, so it was up to the programmer to ensure that overflows did not happen. This compiler was designed to be compatible with IBM System/360 FORTRAN, and even used the same base-16 floating point ...


8

I only have experience of ICL mainframes, CDC, Prime 300, Data General Nova and Eclipse. On those, the programs just crashed. Like Mick's answer, it would be up to the programmer to figure it out. These were variants of Fortran II (lots of 3- way jumps), Fortran IV (or 66) and Fortran V (what the vendor called it). Fortran was mainly used for High ...


7

The compilers I produced or helped produce (40-50 years ago) produced code that kept all floating point numbers as simple 2's complement mantissa/exponent form. It converted them to hardware FP representation and invoked the FP unit to process the arithmetic, then on return converted them back. You have to remember, back in those days FP hardware had a very ...


7

These aren't mainframes by any manner of means, but I've successfully compiled and run Fortran programs on an emulated: DEC PDP-11 running RSX11 DEC PDP-8 running OS 8. Both of these ran under SimH on a Raspberry Pi Zero. The PDP-8, being a small machine, typically ran from paper tape rather than cards. I have reason to believe that another early ...


6

I can't say whether IBM invented this extension or even whether any IBM compiler ever supported it, but at least as of the IBFTC FORTRAN IV compiler for IBSYS version 13 (manual dated 1968), subscripted variables were explicitly prohibited in an ASSIGN. Assuming the vendor's documentation to be accurate :-) A System/360 FORTRAN IV manual says the same thing (...


6

Does it have to be a mainframe, or PDP-11 or VAX would be good enough? If the latter, then there is SIMH, and there is Bitsavers' Software Archive. There was a FORTRAN compiler on BSD UNIX for sure. Better yet, there is no need to simulate the whole system. For convenience, one can use a user space PDP-11 emulator. Binaries can be taken from here, 2.11 BSD ...


5

Before IEE 754, there was no floating point equivalents to "NaN" or "Inf". Overflow, underflow, and division by zero generated interrupts which would be ignored, trapped, or terminated the program with a default error message (and most likely a core dump as well). These options could often be controlled from Fortran by a collection of ...


4

As a Fortran Compiler writer for dusty deck (and other computers), let me add that many answers, although correct, are not focusing on the implementation Fortran language, but features that they might have remembered using from Fortran. Many of those features, although correctly described, are mainly about features provided by the operating system or run-...


4

The emulator B7094 come with Fortran 2 and Fortran 4. It's relatively easy to use (much easier than hercules, of course) : https://www.majorgeeks.com/files/details/b7094_ibm_7094_emulator.html Fortran 4 is very similar to the "still in use" Fortran 77 and any incompatibility can be easily patched. I don't remember if it's shipped with the emulator, ...


4

There are emulators for the historically significant systems produced by Control Data Corp. cdc and Cray cray. DtCYBER, which can be run on Windows and Linux and is available as source code under GPL 3.0 terms. DtCYBER does not include operating systems, compilers, etc., which the user must provide for themselves--a tall order, but probably not impossible. ...


4

Do you consider the PDP-10 a mainframe? Here is a TOPS-10 distribution with Fortran included: http://www.steubentech.com/~talon/pdp10/


4

DEC PDP-10 Fortran documentation says the target of an assigned go to can be a variable or an array element. It sounds like it would allow the construct discussed in this question. see manual This edition of the manual is dated 1972.


3

Fortran was developed with scientific computing in mind. Negative values clearly occur quite frequently when doing scientific computing or, for that matter, in many other problem domains that the developers of the language might have considered. Supporting unsigned integral would have had some value but the language would have still had to support signed ...


3

On BESM-6 the ALU/FPU interrupts (overflow, division by zero) were inexact, thus it was impossible to recover and continue, but it was possible to handle them with a mechanism akin to the setjmp/longjmp capability in the C language, where the "setjmp" equivalent was IFOVFL(DUMMY), returning 0 at setup, and 1 on exception, and the "longjmp"...


3

The answer is "it depends". If your object program is running on a machine that traps on arithmetic overflow, you'll get a trap on arithmetic overflow. If there's a latching overflow indicator, there might be a way to interrogate it; with ICL 1900 FORTRAN, you could CALL OVERFL(K) to set K depending on whether overflow had occurred (K=1 for ...


3

FORTRAN carriage-control from record-based IO on legacy systems can be quite challenging on modern octet-stream systems. If SIMH is using CRs and BSs to format output, the traditional way of cleaning up the stream is to use col -b as a filter to merge the control characters. Update: Okay, so this is a question about HTML overprinting, for which there seems ...


3

Beside the already mentiond Hercules emulation, why not using a real mainframe? The Gesellschaft für historische Rechenanlagen (Society for Historic Computing Machinery) in Munich does offer a free remote login to a (rather modern, 1988) Cray Y-MP. The Y-MP runs usually 24/7. On selected days, a CDC Cyber 960, the last iteration of the CDC6600 design, can be ...


3

Theoretically, assuming two equally optimizing compilers, an Algol program may be either faster than a Fortran program implementing the same algorithm, if in Algol all subroutine parameters are declared as value, and accessed from within the subroutine more efficiently that in Fortran (where everything is passed by reference); or slower, if they are not, and ...


3

For scientific and high performance computing Algol was considered, and possibly is still considered by some, to be a more powerful language than Fortran. Was (is) it? It might be great to have some reference to this. For the same algorithm encoded in both languages and using the same data, which of the two languages executed programs the fastest? A ...


2

The PDP-8, a tiny minicomputer compared to some of the examples here, did the following in its floating point package: The input conversion routine halts on overflow during calculation of the mantissa. Typing RUBOUT and pressing CONTINUE on the console will restart the routine. Overflow during exponent calculation yields an unpredictable result; the ...


2

In my dusty memory, F77 on a CDC Cyber 175 would crash on floating-point overflow, and I would assume that applies from 6600 to 176 as well. That might have been due to local setup.


2

Experimenting with CSS along the lines (pun intended) of "line-height:0" yielded this satisfactory result .over { line-height: 0; margin-top: 0.5em; margin-bottom: -0.5em; } <pre>FIRST LINE PREVIOUS LINE <div class="over">GOOD BYE XXXX XXX HELLO WORLD</div> NEXT LINE LAST LINE</pre> Things are slightly trickier: the default line ...


2

The 1966 ANSI standard X3.9-1966 ANSI standard (https://wg5-fortran.org/ARCHIVE/Fortran66.pdf) just says A GO TO assignment statement is of the form ASSIGN k to i where k is a statement label and i is an integer variable name. so anything other than an integer variable name would have been an extension to Fortran 66. From the compiler writer's point of ...


Only top voted, non community-wiki answers of a minimum length are eligible