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

Last change on this file since 238 was 231, 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: 534 bytes
Line 
1;+
2;
3; @file_comments
4; A kind of keyword_set but when the value exist, it send it back.
5;
6; @categories
7; Utilities
8;
9; @keyword VAR
10; any kind of
11;
12; @returns
13; 0 if the variable does not exist
14;
15; @examples
16; IDL> print, testvar(var=toto)
17; 0
18; IDL> print, testvar(var='toto')
19; toto
20;
21; @history
22; Sebastien Masson (smasson\@lodyc.jussieu.fr)
23;                      14/12/1999
24;
25; @version
26; $Id$
27;
28;-
29;
30FUNCTION testvar, var = var
31;
32  compile_opt idl2, strictarrsubs
33;
34   if keyword_set(var) then return, var ELSE return,  0
35end
Note: See TracBrowser for help on using the repository browser.