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

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

improvements/corrections of some *.pro headers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 904 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
10; Utilities
11;
12; @keyword VAR
13; any kind of
14;
15; @returns
16; 0 if the variable does not exist
17;
18; @examples
19; IDL> print, testvar(var=toto)
20; 0
21; IDL> print, testvar(var='toto')
22; toto
23;
24; @history
25; Sebastien Masson (smasson\@lodyc.jussieu.fr)
26;                      14/12/1999
27;
28; @version
29; $Id$
30;
31;-
32;------------------------------------------------------------
33;------------------------------------------------------------
34;------------------------------------------------------------
35FUNCTION testvar, var = var
36;
37  compile_opt idl2, strictarrsubs
38;
39   if keyword_set(var) then return, var ELSE return,  0
40end
Note: See TracBrowser for help on using the repository browser.