on May 19th, 2017, 3:45pm, Richard Russell wrote:| If the OP's report is correct and you can, at least in some circumstances, use a handle variable... |
|
The report is not correct. The listed code which purports to demonstrate it working does nothing of the kind, as can be shown by running this example in LB 4.04:
Code: fn = fn+1
hvar$ = "#B" + str$(fn)
print hvar$
open "\temp\errors.txt" for input as #hvar$
print hvar$
line input #B1, s$
print s$
close #hvar$
Printing hvar$ after the file has been opened shows that rather than the OPEN statement having opened the file with the handle #B1 as the OP claimed, it has in fact been opened with the handle #hvar1, so a subsequent attempt to read from the file with the expected handle given as a literal fails.
Richard.