BBS: The MOONFLOWER
Date: 05-20-33 ( : ) Number: 21
From: JACK HUDGIONS #60 @9443*2 Refer#: NONE
To: ALL Recvd: YES
Subj: Another approach.. Conf: (218) QuickBASIC
Reply To: Lightnin #42 @5912
L| Let's say for instance, I just want to see free space on a drive..,
| does anyone have a handy and easy (most importantly) way to program
| this call in from line numbered basic? Then maybe a shortie example
| on how to do this in non-line num format?
Here's a quick example. Sorry, no line numbers! <grin>
Before you try this, make sure you run QB with the /L switch, which
tells it to load the QB.QLB quick library. This is needed to make CALL
DIM InReg AS RegType, OutReg AS RegType
DriveLetter$ = "C"
InReg.AX = &H3600
InReg.DX = ASC(DriveLetter$) - 64
CALL Interrupt(&H21, InReg, OutReg)
FreeClusters& = OutReg.BX - 65536 * (OutReg.BX < 0)
PRINT "Space free on drive ";DriveLetter$;": ";
PRINT USING "#########"; FreeClusters& * OutReg.AX * OutReg.CX
Note that in this example, the drive letter is hard-coded to C. In an
actual program, you wouldn't do this! <grin>
þ OLX 3.01 30-4008 þ Please do not read this tagline.
Re: Got a Quick question...
[0m [32m> [0m Previously, David Smith #1 @1205607*1 wrote to All
[0m [32m> [0m Re: Got a Quick question... At: 04-30-93 10:49
[0m [32m> [0m DS> FOR x = 1 TO 50000: NEXT x <--Thought this would be best
[0m [32m> [0m DS> I can definately tell this routine makes the BBS run a littl
[0m [32m> [0m DS> Would there be a better approach to this routine?
[0m [32m> [0m I wouldn't use this loop here, as it is wasting CPU time. Use th
[0m [32m> [0m SLEEP s& command instead to sleep s& seconds.
[0m [32m> [0m
[0m [32m> [0m ... Origin: HOG-2 * LA County * VBBS 6.0 @8180 * End of message
[0m [32m> [0m ___ Blue Wave/QWK v2.12
SUB Pause (Seconds AS INTEGER)
FOR h = 1 TO Seconds
t$ = TIME$
LOOP UNTIL t$ <> TIME$
Origin: HOG-2 VirtualNET/HOGnet @8180 DM @818-369-1223 Los Angeles County [0m