Suggestion for dir()
- Posted by aku saya <akusaya at gmx.net> May 31, 2003
- 402 views
Instead of returning -1 if the file is not found, isn't it better to return {} ? I have had many errors, just because I forgot to check if it is an atom or not, in such lines: dd = dir("c:\\*.bmp") --where no *.bmp files on c:\ for i = 1 to length(dd) do something("c:\\" & dd[i][D_NAME]) end for and it will crash on length().