Last change
on this file since 157 was
157,
checked in by navarro, 18 years ago
|
header improvements + xxx doc
|
-
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 | ;------------------------------------------------------------ |
---|
33 | FUNCTION testvar, var = var |
---|
34 | ; |
---|
35 | compile_opt idl2, strictarrsubs |
---|
36 | ; |
---|
37 | if keyword_set(var) then return, var ELSE return, 0 |
---|
38 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.