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