source: trunk/SRC/ReadWrite/scanoasis.pro @ 114

Last change on this file since 114 was 114, checked in by smasson, 18 years ago

new compilation options (compile_opt idl2, strictarrsubs) in each routine

  • Property svn:executable set to *
File size: 1.1 KB
RevLine 
[44]1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
[106]5; @file_comments scan an Oasis file (version < 2.5)
[44]6;
[106]7; @categories know what is inside
[44]8;
[106]9; @param filename {in}{required} the file name
[44]10;
[106]11; @restrictions List the variable names included in a Oasis file
[44]12;
[106]13; @examples
14;  IDL> scanoasis,'grids_orca_t106'
[44]15;
[106]16; @history Sebastien Masson (smasson\@lodyc.jussieu.fr)
[44]17;                      July 01, 2002
18;-
19;------------------------------------------------------------
20;------------------------------------------------------------
21;------------------------------------------------------------
22
23PRO scanoasis, filename
[114]24;
25  compile_opt idl2, strictarrsubs
26;
[44]27
28   openr, unit,filename , /F77_UNFORMATTED, /GET_LUN, /SWAP_IF_LITTLE_ENDIAN $
29    , error=err
30   if err ne 0 then begin
31      print,!err_string
32      return
33   endif
34
35   char8 = '12345678'
36   WHILE NOT EOF(unit) DO BEGIN
37      readu, unit, char8
38      print,  char8
39      readu, unit
40   ENDWHILE
41
42   free_lun,unit
43   return
44end
Note: See TracBrowser for help on using the repository browser.