Control Statements

IF

    IF (<logical expression>) THEN
        ...
    ELSEIF (<logical expression>) THEN
        ...
    ELSEIF (<logical expression>) THEN
        ...
    ELSE
        ...
    ENDIF
Also:
    IF (<logical expression>) statement

Conditional-exit Loops

    loop1: DO                                     ! -- labels optional;
        ...
        IF (<condition>) CYCLE                    ! -- only loop1 possible;
        ...

        loop2: DO
            ...
            IF (<condition>) EXIT loop1           ! -- defaults to inner loop;
            ...
        ENDDO loop2
    ENDDO loop1

Indexed Loops

    DO i = 1, 100, 1                              ! -- increment defaults to 1;
        <loop statements>
    ENDDO

SELECT CASE

    SELECT CASE(<exp>)
      CASE(<val_1>)
        ...
      CASE(<val_2>)
        ...
      CASE(<val_3>)
        ...
      CASE DEFAULT
        ...
    ENDSELECT


...previousup (conts)next...



About this document:

Produced from the SGML: /home/isd/public_html/_course_fortran_90/_reml_grp/index.reml
On: 10/2/2003 at 10:33:52
Options: reml2 -i noindex -l long -o html -p multiple