comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » file_basename(): bug or feature?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
file_basename(): bug or feature? [message #42773] Thu, 24 February 2005 13:06
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
On Unix machines, IDL's file_basename() function doesn't split a path in
Windows format (with backslashes). On Windows machines, it splits both
(yes, I know, on Windows you can also use both to specify a path). Is
this a bug or a feature?

Linux:

IDL> filename='d:\path\to\file.ex
IDL> print,file_basename(filename)
d:\path\to\file.ex
IDL> filename='d:/path/to/file.ex'
IDL> print,file_basename(filename)
file.ex

Windows:

IDL> filename='d:\path\to\file.ex'
IDL> print,file_basename(filename)
file.ex
IDL> filename='d:/path/to/file.ex'
IDL> print,file_basename(filename)
file.ex

I have a situation where a Linux machine has to handle Windows paths,
where this is quite annoying ...

Any comments? Thanks
Benjamin
[Message index]
 
Read Message
Previous Topic: Help optimizing the nested for loops
Next Topic: Re: file_basename(): bug or feature?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 07:38:48 PDT 2025

Total time taken to generate the page: 1.03890 seconds