Function | Ratfor | Fortran90 | C |
multiple statements | May be separated by ``;''. | Equivalent | Equivalent |
on one line | |||
do | Multi-line statements | DO/ END DO construct, | Equivalent |
bracketed with { }. | may be named. | ||
if | Multi-line statements | Multi-line require THEN/ | Equivalent |
bracketed { } | END IF. | ||
else/ | Multiple statements in { } | Requires THEN/ELSE | Equivalent |
else if | single statements per | THEN/ END IF construct | |
construct do not require {}. | |||
while | while() {} | DO WHILE()/END DO | Equivalent |
break if/while | break | exit | Equivalent |
iterate do | next | CYCLE | continue |
relation operators | ==, !=, >, | .eq. or ==, /= or .ne. | Equivalent |
<, >=, > | .gt. or >, < or .lt., | ||
.ge. or >=, .le. or <= | |||
Comments | #, to the end of the is a | Same functionality | enclosed by |
comment | with !. | /* */ | |
and and or | && , || | .and., .or. | Equivalent |
line | _ | & | end of line |
continuation | delineated | ||
with ``;'' | |||
for statement | for(initial; end; update) | Some of the functionality | Equivalent |
possible with DO. |