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

Last change on this file since 371 was 371, checked in by pinsard, 16 years ago

improvements of headers (alignments of IDL prompt in examples)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 554 bytes
Line 
1;+
2;
3; @file_comments
4; A kind of <proidl>KEYWORD_SET</proidl> but when the value exist, it
5; send it back.
6;
7; @categories
8; Utilities
9;
10; @keyword VAR
11; any kind of
12;
13; @returns
14; 0 if the variable does not exist
15;
16; @examples
17;   IDL> print, testvar(var=toto)
18; 0
19;   IDL> print, testvar(var='toto')
20; toto
21;
22; @history
23; Sebastien Masson (smasson\@lodyc.jussieu.fr)
24;                      14/12/1999
25;
26; @version
27; $Id$
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.