02.07.2013 Views

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

HP Fortran Programmer's Reference

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

DO j = i+1, 100<br />

IF (scores(i) > scores(j)) THEN<br />

temp = scores(i)<br />

scores(i) = scores(j)<br />

scores(j) = temp<br />

END IF<br />

END DO<br />

END DO<br />

Execution control<br />

Control constructs and statement blocks<br />

The following example uses the older syntactic form. Note that, unlike the newer form,<br />

old-style nested DO loops can share the same terminal statement:<br />

DO 10 i = 1, 99<br />

DO 10 j = i+1, 100<br />

if (scores(i)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!