4 ms·
That arithmetic IF sounds really useful for the kind of numerical applications typically written in Fortran. Isn't it only bad because every other language uses
by dmurray 7y ago
That arithmetic IF sounds really useful for the kind of numerical applications typically written in Fortran. Isn't it only bad because every other language uses IF as a boolean conditional?
- tjalfi 7y agoArithmetic 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.