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