Anthony Stone wrote: > [log in to unmask] writes: > > > As the ASSIGN operators were used only by programmers attempting to > > make code totally inscrutable, it may not be amenable to automatic > > translation. > > This seems to have been the view of the Fortran 90 designers when they > made ASSIGN obsolescent. I don't use ASSIGN, but I would have used it > in the following case if it had not been obsolescent. I would be > interested to learn of an equally efficient and straightforward > alternative. > > My program has a large number (several hundred) of shortish segments > of code that are sometimes needed, sometimes not. The ones that are > needed are evaluated many times in the course of one run of the > program. The routine that evaluates them (actually several routines > each dealing with a bunch of them) is handed an ordered list > specifying the items to be evaluated. I would have liked to label each > segment, ASSIGN the labels to an array segment(:) (this only needs to > be done once), and at the end of each segment find the next segment in > the list by > n=n+1; GOTO segment(list(n)) Won't the SELECT CASE statement help here? > Anthony Stone http://fandango.ch.cam.ac.uk/ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%