Re: Dir() problem....

new topic     » goto parent     » topic index » view thread      » older message » newer message

On Fri, 1 Jan 1999 16:19:51 PST, Patrick Quist <quistnet at HOTMAIL.COM> wrote:

>Hy,
>
>(Happy new year.)
>
>I have a problem with dir() (from file.e) .
>If I want the index of files for example :
>dir("*.exe")
>It returns a sequence when there are files.
>It returns -1 when there is no file with .exe .

object d -- gotta be an object, which can hold either sequence or atom (-1)
d = dir("C:\\MTDIR")
if atom(d) then puts(1,"Directory is empty")
else do_something_else()
end if

Irv

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu