Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28602 Discussions

Trouble with "named block DO construct"

jackosullivan
Beginner
420 Views
Trying to use the "named block DO construct" as given in the following example in CVF6.6A*:
LOOP_1: DO K = 1, N
A(K) = C * B(K)
END DO LOOP_1
When I make such a statement set in fixed-format (".for" ) source code, I get
"Syntax error, found IDENTIFIER 'DOK' when expecting one of: DO FORALL ..."
I have not specified F77 compatibility, and trust that the fixed-form source code still permits F90 constructs.
Searches of the forum and of the Web have shed no light on my problem.
(*I've obtained 6.6B, 6.6C, and IVF, but have not had the time to go through all the storkdance of qualifying any of them for installation yet. Is there a fix in one of them, perhaps?)
Can anyone point me in the right direction...please
Thanks and God bless,
Jack
0 Kudos
4 Replies
Steven_L_Intel1
Employee
420 Views
With the labeled DO, you can't put any of the label in columns 1-6. Start in column 7. Only numeric statement labels can be in columns 1-5, and 6 is for continuation.
0 Kudos
jackosullivan
Beginner
420 Views

Thanks, Steve, for the speedy response.

Tried what you said, and still get the same Error. Here's a direct quote from the source code, the C of Condense being in Col.7. Maybe I've got some bad typography?:

      Condense_j: DO j = 1 TO 20
                     d1 = f1(yada-yada)
                     d2 = f2(yada-yada)
                     f = d1-d2
                     IF (ABS(f) .LT. tol) THEN
                        EXIT Condense_j
                     ELSE
                        IF (j .EQ. 20) THEN
                           STOP
                        END IF
                     END IF
                  END DO Condense_j    !NEXT j
                  
and I still get:

: Error: Syntax error, found IDENTIFIER 'DOJ' when expecting one of: DO FORALL SELECT SELECTCASE WHERE IF

Anything else I should be looking out for?

Thanks and God bless!

jack

0 Kudos
jackosullivan
Beginner
420 Views

OOOOPS!

Found it!

Transliterating from Basic is replete with problems, not the least of which is the TOs in the FORs that become DOs needing commas!.

I'm gettin' too old for this, man.

Thanks so much, Steve.

God bless!

Jack

0 Kudos
Steven_L_Intel1
Employee
420 Views
You're welcome. Next time, please post the real source code! It will help get your problem solved sooner.
0 Kudos
Reply