Tel: +44(0)1865 300 579
Fax: +44(0)1865 300 232
Don't just throw it away - recondition it!
| Before | Stage 1 |
|---|---|
IF ( A.GT.B ) GOTO 10 |
IF ( A.GT.B ) THEN |
| Stage 2 | Stage 3 |
IF ( A.GT.B ) THEN |
IF ( A.GT.B ) THEN |
| Stage 4 | Stage 5 |
IF ( A.GT.B ) THEN |
IF ( a.LE.b ) THEN |
| Before | After |
|---|---|
IF ( z.NE.'ONE' ) THEN |
IF ( z.EQ.'ONE' ) THEN |
In the first place, SPAG is now a mature program. Since it was first released in 1986, SPAG has successfully unscrambled billions of lines of spaghetti Fortran, and it does its job without fuss or incident.
Secondly, the way SPAG works - by the repeated application of simple operators - makes it inherently robust.
A third point is that SPAG is largely fail-safe. The compiler acts as a second line of defence, checking the restructured code generated by SPAG. You are far more at risk from compiler bugs!
In fact SPAG provides a way to REDUCE the risk which inevitably goes with change. Using SPAG is certainly orders of magnitude safer than changing your code by hand!