>> With file pointers, the trick is to set flags so that you know that
they're open or closed. <<
Actually there is a way to test if a variable is an open file-handle or
not ( at least in uv):
I have the following code in som subroutines that you can feed with a
open file handle or a file name in FN:
IF FILEINFO( FN,0) THEN ;* He gave us an open file-handle.
FP.FN = FN
FNAM = FILEINFO(FN,1)
END ELSE
OPEN FN TO FP.FN ELSE
ERR.M = Me:": Can't open ":FN
RETURN
END
FNAM = FN
END
Every other test I've tried results in error messages.
This may be universe only - don't know.
-- mats
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/