Last change
on this file since 114 was
114,
checked in by smasson, 18 years ago
|
new compilation options (compile_opt idl2, strictarrsubs) in each routine
|
-
Property svn:eol-style set to
native
-
Property svn:executable set to
*
-
Property svn:keywords set to
Author Date Id Revision
|
File size:
1.0 KB
|
Rev | Line | |
---|
[2] | 1 | ;------------------------------------------------------------ |
---|
| 2 | ;------------------------------------------------------------ |
---|
| 3 | ;------------------------------------------------------------ |
---|
| 4 | ;+ |
---|
| 5 | ; NAME:testvar |
---|
| 6 | ; |
---|
| 7 | ; PURPOSE:une sorte de keyword_set mais qd la valeur existe renvoie |
---|
| 8 | ; celle-ci |
---|
| 9 | ; |
---|
| 10 | ; CATEGORY:comme keyword_set |
---|
| 11 | ; |
---|
| 12 | ; CALLING SEQUENCE:res=testvar(var=variable) |
---|
| 13 | ; |
---|
| 14 | ; INPUTS:rien |
---|
| 15 | ; |
---|
| 16 | ; KEYWORD PARAMETERS:var : n''importe quoi |
---|
| 17 | ; |
---|
| 18 | ; OUTPUTS:0 si la variable n''existe pas |
---|
| 19 | ; |
---|
| 20 | ; COMMON BLOCKS: |
---|
| 21 | ; |
---|
| 22 | ; SIDE EFFECTS: |
---|
| 23 | ; |
---|
| 24 | ; RESTRICTIONS: |
---|
| 25 | ; |
---|
| 26 | ; EXAMPLE: |
---|
| 27 | ; |
---|
| 28 | ; IDL> print, testvar(var=toto) |
---|
| 29 | ; 0 |
---|
| 30 | ; IDL> print, testvar(var='toto') |
---|
| 31 | ; toto |
---|
| 32 | ; |
---|
| 33 | ; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr) |
---|
| 34 | ; 14/12/1999 |
---|
| 35 | ;- |
---|
| 36 | ;------------------------------------------------------------ |
---|
| 37 | ;------------------------------------------------------------ |
---|
| 38 | ;------------------------------------------------------------ |
---|
| 39 | FUNCTION testvar, var = var |
---|
[114] | 40 | ; |
---|
| 41 | compile_opt idl2, strictarrsubs |
---|
| 42 | ; |
---|
[2] | 43 | if keyword_set(var) then return, var ELSE return, 0 |
---|
| 44 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.