1. strange results from dir()
Hello all,
running the following program (Win 98, DOS 7.1, Eu 2.3) I get strange
results with ex.exe on plain DOS and on a DOS box, and also with exw.exe.
--------------------------------------------------------------->8----
Program
----==---------------------------------------------------------==----
include file.e
include get.e
sequence s
object list
-- filespecs containing wildcard and trailing backslash
s = {"c:\\not_there*\\",
"c:\\wind*\\",
"c:\\wi?do\\"}
for i = 1 to length(s) do
list = dir(s[i])
printf(1, "dir(\"%s\"):\n", {s[i]})
if atom(list) then
? list
else
for k = 1 to length(list) do
printf(1, " '%s'\n", {list[k][D_NAME]})
end for
end if
puts(1, '\n')
end for
puts(2, "Press any key ...")
if wait_key() then end if
--------------------------------------------------------------->8----
--------------------------------------------------------------->8----
Output with ex.exe on plain DOS
----==---------------------------------------------------------==----
dir("c:\not_there*\"):
'G'
dir("c:\wind*\"):
'H'
dir("c:\wi?do\"):
'G'
--------------------------------------------------------------->8----
--------------------------------------------------------------->8----
Output with ex.exe on a DOS box
----==---------------------------------------------------------==----
dir("c:\not_there*\"):
'6ƒ6ƒ'
dir("c:\wind*\"):
'7ƒ6ƒ'
dir("c:\wi?do\"):
'6ƒ6ƒ'
--------------------------------------------------------------->8----
--------------------------------------------------------------->8----
Output with exw.exe (!!)
----==---------------------------------------------------------==----
dir("c:\not_there*\"):
' '0'
get_ch()
end while
else
return {GET_FAIL, 0} -- no exponent
end if
e_mag *= e_sign
if e_mag > 308 then
-- rare case: avoid power() overflow
mantissa *= power(10, 308)
if e_mag > 1000 then
e_mag'
dir("c:\wind*\"):
'()
return Get()
end function
global function prompt_number(sequence prompt, sequence range)
-- Prompt the user to enter a number.
-- A range of allowed values may be specified.
object answer
while 1 do
puts(1, prompt)
answer = gets(0) '
dir("c:\wi?do\"):
''
--------------------------------------------------------------->8----
Can anybody reproduce this?
My function lfn_dir() returns -1 in all cases. Is that OK, or what is
the expected result?
Regards,
Juergen
--
/"\ ASCII ribbon | while not asleep do
\ / campain against | sheep += 1
X HTML e-mail and | end while
/ \ news |
2. Re: strange results from dir()
Juergen Luethje writes:
<various funny results when using wildcards with dir()>
> Can anybody reproduce this?
Yes.
I'll look into it.
The wildcard support is provided by Watcom.
I'm not sure exactly what they are doing.
Regards,
Rob Craig
Rapid Deployment Software
http://www.RapidEuphoria.com
3. Re: strange results from dir()
On 24 Dec 2002, at 20:46, Robert Craig wrote:
>
> Juergen Luethje writes:
> <various funny results when using wildcards with dir()>
>
> > Can anybody reproduce this?
>
> Yes.
> I'll look into it.
> The wildcard support is provided by Watcom.
> I'm not sure exactly what they are doing.
Is this going to affect wildcard.e?
Kat
4. Re: strange results from dir()
Kat writes:
> Is this going to affect wildcard.e?
No, not at all.
I'm just referring to the wildcard support in dir()
for DOS and Windows. It depends on a Watcom routine
that's a black box to me.
Regards,
Rob Craig
Rapid Deployment Software
http://www.RapidEuphoria.com
5. Re: strange results from dir()
On Tue, Dec 24, 2002 at 08:07:50PM -0600, Kat wrote:
>
> On 24 Dec 2002, at 20:46, Robert Craig wrote:
>
> >
> > Juergen Luethje writes:
> > <various funny results when using wildcards with dir()>
> >
> > > Can anybody reproduce this?
> >
> > Yes.
> > I'll look into it.
> > The wildcard support is provided by Watcom.
> > I'm not sure exactly what they are doing.
>
> Is this going to affect wildcard.e?
>
> Kat
>
>
>
Unlikely.
Wildcard support is provided by the OS (DOS/Win) and not the compliler itself,
iirc. [Hence Linux and FreeBSD's dir() doesnt support wildcards directly -
because the OSes don't support it either, tho the shell (/bin/sh) does.]
wildcard.e, however, is 100% Pure Eu.
So i doubt its being affected by this.
jbrown
--
/"\ ASCII ribbon
\ / campain against
X HTML e-mail and
/ \ news