TIP: Click on subject to list as thread! ANSI
echo: qedit
to: ALL
from: ROSS_BOYD@TNT.COM.AU
date: 1998-01-08 08:14:00
subject: TSE/Pro 2.8b Tip: How to get a list of d08:14:2201/08/98

From: Ross_Boyd@tnt.com.au
Hi all,
Maybe someone is interested in this.
Last night I was experimenting with a function to return a list of 
valid drives and came across this little gem.
There is a function GetNextConnection() which will give you a list of 
valid drives like this:
--------------------------------------------------------------------------
string proc GetDriveString()
	string drive[20] = ""
	string drivestr[80] = ""
	while GetNextConnection(drive)
		drivestr = drivestr + drive + " "
	endwhile
	return(drivestr)
end
proc Main()	
	Warn("DriveList=",GetDriveString())
end
---------------------------------------------------------------------------
integer proc GetNextConnection(drive) sequentially sets the passed 
string variable to the drive letter including colon.
It returns false/0 when there are no more drives (at which point it 
begins again at the first valid drive).
Also, it skips the logical floppy B: drive (if you only have one floppy 
A: drive)
See example above.
It's _much_ faster than testing the return of LogDrive('a' to 'z') in a loop.
 I think its limited to TSE 2.8b although I haven't actually checked.
Hope this is of use to someone.
Cheers,
Ross

---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.