source: trunk/SRC/Utilities/testvar.pro @ 133

Last change on this file since 133 was 133, checked in by navarro, 18 years ago

english and nicer header (1)

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
File size: 908 bytes
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5;
6; @file_comments
7; A  kind of keyword_set but when the value exist, it send it back
8;
9; @categories utlities
10;
11; @keyword var any kind of
12;
13; @returns 0 if the variable does not exist
14;
15; @examples IDL> print, testvar(var=toto)
16;           0
17;    IDL> print, testvar(var='toto')
18;    toto
19;
20; @history Sebastien Masson (smasson@lodyc.jussieu.fr)
21;                      14/12/1999
22;
23; @version $Id$
24;
25;-
26;------------------------------------------------------------
27;------------------------------------------------------------
28;------------------------------------------------------------
29FUNCTION testvar, var = var
30;
31  compile_opt idl2, strictarrsubs
32;
33   if keyword_set(var) then return, var ELSE return,  0
34end
Note: See TracBrowser for help on using the repository browser.