Van Snyder sent the indented text:
>
[...]
>
> and Phillip Helbig wrote:
>
> > I suppose the poor man's way to do this is with a one-trip do loop:
> >
> > INTEGER :: DUMMY
> >
> > BLOCK_LABEL: DO, DUMMY = 1, 1, 1
> >
> > ...
> >
> > END DO BLOCK_LABEL
> >
> > I suppose one could write "BLOCK" in the code then globally replace this
> > with "DO, DUMMY = 1, 1, 1", ditto for "END BLOCK" and "END DO".
> >
> > Not elegant, but a) is this the functionality needed (or am I missing
> > something) and b) this could easily be done automatically immediately
> > before compile.
>
> Phillip hasn't missed anything. The primary objections are that
> DO DUMMY = 1,1,1 is ugly, and using a preprocessor to replace DO BLOCK
> with DO DUMMY = 1,1,1 is mildly irritating. There's also the problem
> of having these constructs nested, so the preprocessor would need to
> invent dummy induction variables. I.e., a simple search-and-replace
> done by "sed" or equivalent wouldn't work: a more capable preprocessor
> is necessary.
>
> Best regards,
> Van Snyder
>
Here's a method without dummy induction variables:
BLOCK_LABEL: DO
...
EXIT BLOCK_LABEL
END DO BLOCK_LABEL
Still less than elegant ...
--
John Jeffrey Venier, B.A., M.Stat. Programmer Analyst III
Section of Computer Science Department of Biomathematics
The University of Texas M. D. Anderson Cancer Center, Houston, Texas
[log in to unmask] +1 713 792 2622
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
|