Last change
on this file since 153 was
136,
checked in by pinsard, 18 years ago
|
some improvements and corrections in some .pro file according to
aspell and idldoc log file
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Id
|
File size:
900 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 utlities |
---|
10 | ; |
---|
11 | ; @keyword var |
---|
12 | ; any kind of |
---|
13 | ; |
---|
14 | ; @returns |
---|
15 | ; 0 if the variable does not exist |
---|
16 | ; |
---|
17 | ; @examples |
---|
18 | ; IDL> print, testvar(var=toto) |
---|
19 | ; 0 |
---|
20 | ; IDL> print, testvar(var='toto') |
---|
21 | ; toto |
---|
22 | ; |
---|
23 | ; @history Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
24 | ; 14/12/1999 |
---|
25 | ; |
---|
26 | ; @version $Id$ |
---|
27 | ; |
---|
28 | ;- |
---|
29 | ;------------------------------------------------------------ |
---|
30 | ;------------------------------------------------------------ |
---|
31 | ;------------------------------------------------------------ |
---|
32 | FUNCTION testvar, var = var |
---|
33 | ; |
---|
34 | compile_opt idl2, strictarrsubs |
---|
35 | ; |
---|
36 | if keyword_set(var) then return, var ELSE return, 0 |
---|
37 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.