GET_LUN running out of LUNs? [message #31121] |
Wed, 12 June 2002 16:40 |
MKatz843
Messages: 98 Registered: March 2002
|
Member |
|
|
I'm having trouble with GET_LUN and OPENW,
running out of free units, even though I'm very careful
to close every unit I open. These are units numbered
from 100 to 128. I don't remember reading that
IDL treats them differently than numbers below 100.
Here's are three examples.
FOR i=0,30 do BEGIN
GET_LUN, unit
print, i, unit
close, unit
ENDFOR
END
Output:
0 100
1 101
2 102
. . .
27 127
28 128
% GET_LUN: All available logical units are currently in use.
% Execution halted at: $MAIN$ 2
However, if I do this
FOR i=0,30 do BEGIN
GET_LUN, unit
print, i, unit
close, unit, /ALL ;--- Note the /ALL here.
ENDFOR
END
Then the output is
0 100
1 100
2 100
. . . and so forth. Perfect.
I get the same behavior when OPENW replaces GET_LUN
as follows
OPENW, unit, filename, /GET_LUN
So it would appear that IDL is ignoring my request to CLOSE
the file unit, unless I specify /ALL.
Am I missing a trick here. Do I need to use
CLOSE, unit, /PLEASE ?
Thanks,
M. Katz
|
|
|