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

Home » Public Forums » archive » Cross-platform !PATH (was Cross-platform PWD)
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Cross-platform !PATH (was Cross-platform PWD) [message #11897] Wed, 03 June 1998 00:00 Go to next message
mallors is currently offline  mallors
Messages: 76
Registered: November 1997
Member
In article <35758A5A.1721@cdc.noaa.gov>,
Andy Loughe <afl@cdc.noaa.gov> writes:
>
> Heretofore all my development has been on a Unix box,
> so I am now beginning to learn to write code that can
> run on multiple platforms. A new and fun challenge!
>

How about this one:

How does one expand !PATH in a platform independent
manner?

CD, CURRENT = currentDir
!PATH = EXPAND_PATH ('+' + currentDir) + delimiter + !PATH

"delimiter" is platform-dependent, but required :-(


-bob


--
Robert S. Mallozzi
http://cspar.uah.edu/~mallozzir/
Re: Cross-platform !PATH (was Cross-platform PWD) [message #11948 is a reply to message #11897] Mon, 08 June 1998 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Robert S. Mallozzi wrote:
>

> How about this one:
>
> How does one expand !PATH in a platform independent
> manner?
>
> CD, CURRENT = currentDir
> !PATH = EXPAND_PATH ('+' + currentDir) + delimiter + !PATH
>
> "delimiter" is platform-dependent, but required :-(

You can use the system variable !VERSION:

case ( strupcase(!version.os_family)) of
'UNIX': delim = '/'
'MACOS': delim =
'VMS': delim =
'WINDOWS': delim = '\'
else: print, 'OS uncrecognized'
endcase

!VERSION.OS contains more specific OS information.

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Object Graphics and VRML?
Next Topic: Re: Postscript problem

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

Current Time: Thu Oct 09 22:01:08 PDT 2025

Total time taken to generate the page: 0.64165 seconds