The first syntax is used to ensure isolation of select lists.

It is a good practice to get into, in case someone later on modifies the
code processing whatever you are handling in your selection, especially if
that processing involves calling an external subroutine. Personally I prefer
to use select variables rather than list numbers for certain isolation.

Just in case that isn't clear, consider an example selecting and processing
some files.

If you were to do the following:

Open "VOC" To VOC Else STOP
Execute 'SELECT VOC WITH F1 LIKE F...'
Fin = @False
Loop
  ReadNext FileName Else Fin = @True
Until Fin Do
  GoSub DoFile
Repeat
(etc)

DoFile:
  Open FileName To FL Else Return
  Select FL
  Fin2 = @False
  Loop
    ReadNext Id Else Fin2 = @True
  (etc)

The second select in DoFile will overwrite the contents the active select
list of files.

Using redirection this would be handled safely as the outer select is
isolated from the inner one:

Open "VOC" To VOC Else STOP
Execute 'SELECT VOC WITH F1 LIKE F...', SELECT. > FILELIST
Fin = @False
Loop
  ReadNext FileName FROM FILELIST Else Fin = @True
Until Fin Do
  GoSub DoFile
Repeat
(etc)

Brian
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to