1. dir() bug in Linux

>From the html manual:

include file.e
 x = dir(st)
Return directory information for the file or directory named by st. 
If there is no file or directory with this name then -1 is returned. 
st can contain * and ? wildcards to select multiple files. 
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Nope. 
If 'st' contains an asterisk, e.g. x = dir("/home/irv/*.exu") then the 
program bombs.
Same with x = dir(*.exu") when checking the current directory,.
Whenever wildcards are used x always returns a -1.

The only thing that does work correctly is this:
x = dir("/home/irv") without wildcards, it returns the 
entire directory listing.

--------
Regards,
Irv

new topic     » topic index » view message » categorize

2. Re: dir() bug in Linux

Irv Mullins writes:
> st can contain * and ? wildcards to select multiple files. 
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Nope. 

Thanks.
Wildcards for dir() is actually implemented by the C library.
It works with WATCOM, Lcc and Borland,
but not with GNU C on DOS or Linux.

A couple of releases ago wildcards weren't even 
documented for dir(), although they worked.

I'll fix either the documentation or the dir() code for
the next release. 

Regards,
   Rob Craig
   Rapid Deployment Software
   http://www.RapidEuphoria.com

new topic     » goto parent     » topic index » view message » categorize

3. Re: dir() bug in Linux

--------------Boundary-00=_MVR5KT0YHATO3893BC5M
  charset="iso-8859-1"

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu