haha very funny
- Posted by euman at bellsouth.net Oct 21, 2001
- 369 views
sequence dirs dirs = dir(FileSpec) for i = 1 to length(dirs) do dirs will actually contain file or directory info if there are any files or directories This from the Euphoria docs: d = dir(current_dir()) -- this says right up front dir( ) returns a sequence doesnt it! -- d might have: { {".", "d", 0 1994, 1, 18, 9, 30, 02}, {"..", "d", 0 1994, 1, 18, 9, 20, 14}, {"fred", "ra", 2350, 1994, 1, 22, 17, 22, 40}, {"sub", "d" , 0, 1993, 9, 20, 8, 50, 12} } OK, very well then, but when it doesnt contain info the return value is -1 which gives us a type_check error... OK then, we name dirs as an object and because we look for a length to dirs next we get this error message > length of an atom not defined.....huh this from the Euphoria Docs If there is no file or directory with this name then -1 is returned OK, if we keep the dir defined as an object and run a test to make sure dirs is not -1 like this: if dir(FileSpec) != -1 then we get true/false condition must be an ATOM and damn I could list several other error messages and code but you all get the point now. We are so restricted it's not funny... I'll go to bed now.....later yall. Euman euman at bellsouth.net