Hot answers tagged

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

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

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

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.


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 ...


6

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 ...


6

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 ...


5

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

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. ...


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

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


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 ...


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 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.


1

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 ...


1

The obvious reason why "Hello World" isn't printed is that if (i=j) print 10 is not standard Fortran in any dialect I have ever seen in 40+ years of Fortran programming. Even in Fortran 90 and later, the relational operator for equality is == not =. If there is a "bug", probably it is the fact that the compiler didn't print an error message, or your ...


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