3 ms·
Arithmetic IF directly matches a hardware instruction on the IBM 704. This was the first computer with a Fortran compiler. IF (VALUE) 10, 20, 30 The three ar
by tjalfi 7y ago
Arithmetic IF directly matches a hardware instruction on the IBM 704.
This was the first computer with a Fortran compiler.
IF (VALUE) 10, 20, 30
The three arguments after the value are labels that the program jumps to.
The equivalent of this line in C is something like this:
if (value < 0)
{
goto 10;
}
else if (value == 0)
{
goto 20;
}
else
{
goto 30;
}
Fortran 77 added logical IFs that work like most other programing languages.