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

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

header improvements : type of parameters and keywords, default values, spell checking + idldoc assistant (IDL online_help)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 905 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 Sebastien Masson (smasson\@lodyc.jussieu.fr)
25;                      14/12/1999
26;
27; @version $Id$
28;
29;-
30;------------------------------------------------------------
31;------------------------------------------------------------
32;------------------------------------------------------------
33FUNCTION testvar, var = var
34;
35  compile_opt idl2, strictarrsubs
36;
37   if keyword_set(var) then return, var ELSE return,  0
38end
Note: See TracBrowser for help on using the repository browser.