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

Home » Public Forums » archive » Re: Creating Directories
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Creating Directories [message #16241 is a reply to message #16210] Tue, 13 July 1999 00:00 Go to previous messageGo to previous message
Harald Frey is currently offline  Harald Frey
Messages: 41
Registered: March 1997
Member
Trond Trondsen wrote:

> The solutions presented in this thread all seem to be unacceptable
> in view of the fact that IDL is, in principle, platform independent.
> I was contracted to write a piece of widget software that is supposed
> to run under unix/linux (the only platform *I* am able to stomach),
> VMS, Mac, as well as MS-Win/99 (or whatever it's called now). I happen to need
> to create subdirectories recursively and so on -- so, if I may ask,
> where is the IDL command to do directory creation platform independently.
> Independent like FILEPATH, for example. If I had direct access to all the
> different platforms I could of course easily write my own function using
> the !VERSION system variable. Let me know if anybody comes up with a
> CREATEDIR command for IDL. :-) -trond
>

This may not be the "perfect and complete" answer, but what I do to run a program
on different platforms is to use a batch file which defines the common blocks
(oh, yes I use common blocks!) and defines the platform specific path names,
directory separators etc.
Here is the main part of the batch file as an example:

========== snipped some code here ==========
; on which computer is it running
; this list can be extended in future if neccessary

; you have to edit this datapath and the filepath for the programs
case !version.arch of $
"sparc": begin $
data_path='/disks/sprite/disk2/hfrey/ago/' &$
file_path='/disks/sprite/disk1/hfrey/idl/ago/' &$
dir_sep='/' &$
dev_name='X' &$
end &$
"PowerMac": begin $
data_path='+Hard Disk:applications:IDL:IDL 4.0:ago' &$
file_path='+Hard Disk:applications:IDL:IDL 4.0:ago' &$
dir_sep=':' &$
dev_name='MAC' &$
end &$
"alpha": begin $
data_path='[hfr.idl.ago.data' &$
file_path='[hfr.idl.ago ' &$
dir_sep='.' &$
dev_name='X' &$
end &$
else: begin $
print,'You have to edit the case statement in ago_config.cmn' &$
stop &$
end &$
endcase
================ end of batch ==============================

All my procedures call this batch at the beginning with

@ago_config.cmn

and you might include the platform specific differences in the directory creation
here as well.

Harald
hfrey@ssl.berkeley.edu
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Union in IDL?
Next Topic: Re: Creating a Runtime App using Object Graphics

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

Current Time: Mon Dec 01 15:29:52 PST 2025

Total time taken to generate the page: 0.64036 seconds