[futurebasic] Usr ScanFolder

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : May 2005 : Group Archive : Group : All Groups

From: Joe Smith <jsmithxx@...>
Date: Tue, 31 May 2005 07:13:03 -0400
Can someone explain why the program below works when the code is NOT in the
'local fn' but does work without the 'local fn' .

Thanks

Joe


'€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€€
include "Util_Files.incl"
'============================
local fn ScanFolder
'==========================
dim ScanRec   as FileScanRec
dim ScanFSpec as FSSpec
dim temp$

temp$ = files$(_FSSpecFolder,"","",ScanFSpec)

ScanRec.ScanSpec  = ScanFSpec
ScanRec.ScanIndex = 0

while usr ScanFolder(ScanRec) >= 0
long if ScanRec.FndrFlags and _finvisible
print ScanRec.ScanIndex,"Not Visible"
xelse
print ScanRec.ScanSpec.name
end if
wend
print

End Fn

'==================
fn ScanFolder

do 
handleevents
until mouse(_down)