A suggestion

Started by linli, September 28, 2009, 05:38:45 AM

Previous topic - Next topic

linli

I just noticed that when I do (directory? "c:"), I got nil. Should it return true instead? The drive can be considered as the "root" directory on that drive.

HPW

#1
How about:

> (directory? "C:\.")
true
> (directory? "C:.")
true
> (directory? "C:.")
true
Hans-Peter

newdep

#2
what newlisp version are you using ?



because I get true out of this ->



>(directory? {c:})

true



the "c:" gives an error..
-- (define? (Cornflakes))

linli

#3
I am using 10.1.5.

(directory? "c:\") => nil

(directory? "c:\\") =>true

newBert

#4
For me on Win XP with NewLISP 10.1.5 :


QuotenewLISP v.10.1.5 on Win32 IPv4, execute 'newlisp -h' for more info.



> (directory? "c:")



ERR: string token too long : "c:")rn"

> (directory? "c:\")

nil

> (directory? {c:})

nil

> (directory? {c:\})

true

>


and :


Quote> (directory? "c:/")

nil

> (directory? "")



ERR: string token too long : "")rn"

> (directory? "\")

nil

> (directory? "\.")

true

> (directory? "/.")

true

>
<r><I>>Bertrand<e></e></I> − <COLOR color=\"#808080\">><B>newLISP<e></e></B> v.10.7.6 64-bit <B>>on Linux<e></e></B> (<I>>Linux Mint 20.1<e></e></I>)<e></e></COLOR></r>