source: trunk/SRC/ForOldVersion/keep_compatibility.pro @ 325

Last change on this file since 325 was 325, checked in by pinsard, 17 years ago

modification of some headers (+some corrections) to prepare usage of the new idldoc

  • Property svn:keywords set to Id
File size: 2.9 KB
RevLine 
[55]1;+
[232]2;
[122]3; @file_comments
[317]4; For internal use of SAXO
[55]5;   1) define key_forgetold = 1b - keyword_set(flag)
6;   2) remove all oldcm_used.pro found in !path
7;   3) define and create myuniquetmpdir and add it to !path
8;   4) copy oldcm_full(_empty) to myuniquetmpdir+'oldcm_used.pro'
[317]9;   5) make sure that the common variables are correctly initialized.
10;   6) merge the online_help if possible...
[55]11;
[238]12; @categories
[157]13; Compatibility
[55]14;
[238]15; @param flag {in}{optional}
16; 1 or 0 to keep or forget the compatibility
[55]17;
[238]18; @uses
19; cm_general
[55]20;
[122]21; @examples
[317]22; keep_compatibility, 0
[122]23;
[238]24; @history
25; Sebastien Masson (smasson\@lodyc.jussieu.fr)
[55]26;                      June 2005
27;
[238]28; @version
29; $Id$
[122]30;
[55]31;-
32PRO keep_compatibility, flag
33;
[114]34  compile_opt idl2, strictarrsubs
35;
[55]36@cm_general
37;
[317]38  IF n_elements(myuniquetmpdir) NE 0 THEN return
39;
[55]40; version should be at least 6.0
41;
[122]42  IF fix(strmid(!version.release, 0, 1)) LT 6 THEN BEGIN
[55]43    print, '                   *** ***** ***'
44    print, '                   *** ERROR ***'
45    print, '                   *** ***** ***'
46    print, 'This version of SAXO needs at least IDL version 6.0'
47    print, '                   *** ***** ***'
48    print, '                   *** ERROR ***'
49    print, '                   *** ***** ***'
50    return
51  ENDIF
[116]52; are we using the virtual machine??
[281]53  IF n_elements(key_vm) EQ 0 THEN key_vm = lmgr(/vm)
54; are we using gdl or idl??
55  defsysv, '!gdl', exist = key_gdl
[55]56;
[122]57  if n_elements(flag) eq 0 then flag = 1b - keyword_set(key_forgetold)
[55]58; 1) automatic definition of key_forgetold
[122]59  key_forgetold = 1b - keyword_set(flag)
[55]60;
61; 2) remove all oldcm_used.pro found in !path
62  to_rm = find('oldcm_used')
63  IF to_rm[0] NE 'NOT FOUND' THEN file_delete, to_rm
64;
65; 3) define and create myuniquetmpdir and add it to !path
66  def_myuniquetmpdir
[116]67; if we are using the virtual machine, there is no need to do this
68  IF NOT keyword_set(key_vm) THEN BEGIN
[55]69;
70; 4) copy oldcm_full(_empty) to myuniquetmpdir+'oldcm_used.pro'
71; select which file should be copied to oldcm_used.pro
[122]72    IF key_forgetold THEN BEGIN
[116]73      oldcm = find('oldcm_empty')
74      print, 'We forget the compatibility with the old version'
[122]75    ENDIF ELSE BEGIN
76      oldcm = find('oldcm_full')
[116]77      print, 'We keep the compatibility with the old version'
[122]78    ENDELSE
[55]79;
[116]80    oldcm = oldcm[0]
81    IF oldcm EQ 'NOT FOUND' THEN BEGIN
82      print, 'Error: oldcm_full or oldcm_empty must be found in the !path'
83      stop
84    ENDIF
[55]85; copy
[116]86    file_copy, oldcm, myuniquetmpdir + 'oldcm_used.pro', /overwrite
[55]87;
[116]88; make sure we can make the plots even if we are using the demo mode
[55]89;
[116]90    demomode_compatibility
91  ENDIF
[55]92;
[317]93; 5) make sure that the common variables are correctly initialized.
[76]94;
[122]95  IF size(ccmeshparameters, /type) NE 8 THEN BEGIN
[76]96    computegrid, 1, 1, 1, 1, 1, 1, /fullcgrid
[122]97@cm_4data
[76]98    varname = ''
99    vargrid = 'T'
100    vardate = '0'
101    varexp = ''
102    varunit = ''
103    valmask = 1.e20
104  ENDIF
[122]105;
[317]106; 6) merge the online_help if possible...
[175]107;
108  mergeonline_help
109;
[55]110  return
111END
Note: See TracBrowser for help on using the repository browser.