>How can I be assured that it will be unique? I use the sys(3) function to produce probably hundreds of files, and if one is accidentally overwritten it would be bad. Thanks!
>
>MAC
If you want to stick to 8 letters file names, You could use adir in conbination with sys(3) to get unique names, something like: (Assuming default path)
local lcFileName, laFiles(1)
lcFileName = sys(3)
do while adir(laFiles, forcext(lcFileName, 'DBF'))=1
lcFileName = sys(3)
enddo
You can use also file(lcFileName) although it has some problems, or sys(2000) to verify if the file exists
"The five senses obstruct or deform the apprehension of reality."
Jorge L. Borges?
"Premature optimization is the root of all evil in programming."
Donald Knuth, repeating C. A. R. Hoare
"To die for a religion is easier than to live it absolutely"
Jorge L. Borges