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

Home » Public Forums » archive » Re: Requested change to "SAVE" procedure
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: Requested change to "SAVE" procedure [message #82868 is a reply to message #82867] Tue, 22 January 2013 08:51 Go to previous messageGo to previous message
Phillip Bitzer is currently offline  Phillip Bitzer
Messages: 223
Registered: June 2006
Senior Member
How about rolling your own? This certainly not complete, but feel free to change/modfy/improve from here. RIght now, it just tests if the file exists and issues an error. (BTW, you'll need Coyote's Error_message.pro to run it...or you could change the error handler).

Cheers,
Phillip

PRO mysave, var1, var2, var3, _extra = extra

compile_opt idl2

;error catcher:
CATCH, theError
IF theError NE 0 THEN BEGIN
CATCH, /cancel
ok = ERROR_MESSAGE(TRACEBACK=1, QUIET=1)
RETURN
ENDIF

IF N_TAGS(extra) NE 0 THEN BEGIN ;make sure some keywords were defined
ind = WHERE(STREGEX(TAG_NAMES(extra), '^f', /FOLD_CASE, /EXTRACT), count) ;find the filename tag
file = extra.(ind)
ENDIF ELSE file = 'idlsave.dat' ;this is the default of IDL's SAVE pro

IF FILE_TEST(file) THEN MESSAGE, 'File exists!'

save, var1, var2, var3, _extra=extra

END

;main level program for testing:
a = findgen(10)

mysave, a, f='hello.sav', /var

END
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Reading CDF files on a Mac
Next Topic: Re: Region_Grow kills IDL Workbench on Windows

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

Current Time: Wed Oct 08 15:11:07 PDT 2025

Total time taken to generate the page: 0.00588 seconds