Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!usc!cs.utexas.edu!uunet!van-bc!ubc-cs!newsserver.sfu.ca!shephard From: shephard@newsserver.sfu.ca (Gordon Shephard) Newsgroups: comp.lang.pascal Subject: TP 6.0 Bug with Find First Summary: Find Next doesn't seem to pay attention to the attr. parameter Keywords: Bug, Turbo Pascal, FindFirst,FindNext Message-ID: <1991Apr30.053840.6297@newsserver.sfu.ca> Date: 30 Apr 91 05:38:40 GMT Organization: Simon Fraser University, Burnaby, B.C., Canada Lines: 27 The example program below lists all Files instead of just directories. Bug? Or am I missing something obvious. (Files are found with an attribute not equal to $10, E.G. $21. I guess this could also be a bug with FindNext.) { Example for FindFirst and FindNext } uses Dos,Crt; var DirInfo: SearchRec; begin ClrScr; FindFirst('*.*', Directory, DirInfo); while DosError = 0 do begin WriteLn(DirInfo.Name); FindNext(DirInfo); end; end. -- ----------------------------------------------------------------------- | Gordon Harry Shephard | Distributed Computing Support Group | | Academic Computing Services | Shephard@ucs.sfu.ca | | Simon Fraser University | USERGHS@SFU.BITNET |