source: trunk/SRC/ToBeReviewed/WIDGET/AUTOUR_de_XXX/loadgrid.pro @ 367

Last change on this file since 367 was 327, checked in by pinsard, 16 years ago

modification of headers : mainly blanks around = sign for keywords in declaration of function and pro

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1;+
2;
3; @file_comments
4;
5; @categories
6;
7; @param MESHFILETXTIN
8;
9; @keyword _EXTRA
10; Used to pass keywords
11;
12; @returns
13;
14; @uses
15;
16; @restrictions
17;
18; @examples
19;
20; @history
21;
22; @version
23; $Id$
24;
25; @todo
26; seb
27;
28;-
29PRO loadgrid, meshfiletxtin, _EXTRA=ex
30;
31  meshfilein = strsed(meshfiletxtin,'@@@', '''')
32;
33  compile_opt idl2, strictarrsubs
34;
35@cm_4mesh
36  ccmeshparameters.filename = meshfilein
37; split the name according to "," delimiter
38  meshfile = strsplit(meshfilein, ',', /extract)
39  meshfile = strtrim(meshfile, 2)
40; try to find a .pro file with this name...
41  filepro = find(meshfile[0], /firstfound, /onlypro)
42; if this is an idl batch file or a procedure
43  if filepro NE 'NOT FOUND' THEN BEGIN
44    CASE protype(filepro) OF
45; this is a procedure
46      'proc':listing = file_basename(filepro, '.pro')
47; this is a function, this case is not coded...
48      'func':stop
49; this is an IDL batch file
50      'batch':listing = '@'+file_basename(filepro, '.pro')
51    ENDCASE
52  ENDIF ELSE BEGIN
53    filenc = find(meshfile[0], /firstfound, /onlync)
54    if filenc EQ 'NOT FOUND' THEN stop
55    listing = 'initncdf, ''' + filenc +''''
56  ENDELSE
57; add the arguments and keywords if necessary
58  IF n_elements(meshfile) GT 1 AND strmid(listing, 0, 1) NE '@' THEN $
59    listing = listing + strmid(meshfilein, strpos(meshfilein, ','))
60
61  meshfilein = strsed(meshfilein, '''', '@@@')
62  IF strmid(listing, 0, 1) NE '@' THEN listing = listing + ', strcalling = ''' + meshfilein + ''', _extra = ex'
63
64  createpro, listing, filename = myuniquetmpdir +'for_createpro.pro', _extra = ex
65
66return
67END
Note: See TracBrowser for help on using the repository browser.