is_a_dir.pro
来自「IDL语言编写的用于天文自适应光学仿真的软件CAOS V6.0的第一部分。」· PRO 代码 · 共 36 行
PRO
36 行
; $Id: is_a_dir.pro,v 1.2 2002/03/14 11:49:12 riccardi Exp $
;+
;
; NAME
;
; IS_A_DIR
;
; SYNTAX
;
; ret = is_a_dir(dirname)
;
; dirname: scalar string containing the directory name to test.
;
; ret: scalar byte. 1B or 0B if dirname is or is not the name of an
; existing directory.
;
function is_a_dir, dirname
cd, CURR=curr_dir
catch, no_valid_dir
if no_valid_dir ne 0 then begin
;; error occurred changing the directory
return, 0B
endif
;; try to change directory to dirname
cd, dirname
;; if you are here the directory changing succeeded
cd, curr_dir
return, 1B
end
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?